feat: add user_list

This commit is contained in:
2025-12-17 13:24:32 +08:00
parent dae9a0e55a
commit 14842d989c
20 changed files with 736 additions and 130 deletions

View File

@@ -1,28 +1,21 @@
package super
import (
"os"
"path/filepath"
"github.com/gofiber/fiber/v3"
)
// @provider
type staticController struct{}
// Static
//
// @Tags Super
// @Router /super/*
func (ctl *staticController) static(ctx fiber.Ctx) error {
root := "/home/rogee/Projects/quyun_v2/frontend/superadmin/dist/"
param := ctx.Params("*")
file := filepath.Join(root, param)
// // Static
// //
// // @Tags Super
// // @Router /super/*
// func (ctl *staticController) static(ctx fiber.Ctx) error {
// root := "/home/rogee/Projects/quyun_v2/frontend/superadmin/dist/"
// param := ctx.Params("*")
// file := filepath.Join(root, param)
// if file not exits use index.html
if _, err := os.Stat(file); os.IsNotExist(err) {
file = filepath.Join(root, "index.html")
}
// // if file not exits use index.html
// if _, err := os.Stat(file); os.IsNotExist(err) {
// file = filepath.Join(root, "index.html")
// }
return ctx.SendFile(file)
}
// return ctx.SendFile(file)
// }