2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

feat: 优化app路由加载

This commit is contained in:
耗子
2024-11-11 01:07:37 +08:00
parent 1316c50a57
commit bb140ade7b
3 changed files with 7 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ func All() []*types.App {
func Boot(r chi.Router) {
apps.Range(func(_, app any) bool {
if p, ok := app.(*types.App); ok {
r.Route(fmt.Sprintf("/api/apps/%s", p.Slug), p.Route)
r.Route(fmt.Sprintf("/%s", p.Slug), p.Route)
}
return true
})