22 lines
504 B
Go
22 lines
504 B
Go
package super
|
|
|
|
// @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)
|
|
|
|
// // 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)
|
|
// }
|