feat: add static file serving and refactor route registration

This commit is contained in:
2025-12-16 22:40:31 +08:00
parent 55c40c4601
commit 2a12e1c3a9
7 changed files with 41 additions and 21 deletions

View File

@@ -0,0 +1,20 @@
package super
import (
"github.com/gofiber/fiber/v3"
)
// @provider
type staticController struct{}
// Static
//
// @Tags Super
// @Router /super/*
func (ctl *staticController) static(ctx fiber.Ctx) error {
param := ctx.Params("*")
if param == "" {
param = "index.html"
}
return ctx.SendFile("/home/rogee/Projects/quyun_v2/frontend/superadmin/dist/" + param)
}