mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-01-23 21:19:31 -06:00
Refactor router mounting logic for better organization and readability
This commit is contained in:
@@ -13,6 +13,10 @@ func MountRouter(app *echo.Echo, servs *service.Service) {
|
||||
mids := middleware.New(servs)
|
||||
|
||||
app.StaticFS("", static.StaticFs)
|
||||
api.MountRouter(app.Group("/api"), servs)
|
||||
web.MountRouter(app.Group(""), mids, servs)
|
||||
|
||||
apiGroup := app.Group("/api")
|
||||
api.MountRouter(apiGroup, servs)
|
||||
|
||||
webGroup := app.Group("", mids.InjectReqctx)
|
||||
web.MountRouter(webGroup, mids, servs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user