feat: add redirect api

This commit is contained in:
steven
2022-09-30 08:41:35 +08:00
parent 39e00637a3
commit 02619882d1
6 changed files with 65 additions and 2 deletions

View File

@@ -56,6 +56,12 @@ func NewServer(profile *profile.Profile) *Server {
Profile: profile,
}
redirectGroup := e.Group("/o")
redirectGroup.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
return aclMiddleware(s, next)
})
s.registerRedirectRoutes(redirectGroup)
apiGroup := e.Group("/api")
apiGroup.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
return aclMiddleware(s, next)