feat: add user_list
This commit is contained in:
@@ -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)
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user