feat: implement redirector api

This commit is contained in:
Steven
2023-06-23 10:03:47 +08:00
parent 2aae515544
commit 60da9b7e7b
6 changed files with 53 additions and 13 deletions

View File

@ -19,9 +19,13 @@ func NewAPIV1Service(profile *profile.Profile, store *store.Store) *APIV1Service
}
}
func (s *APIV1Service) Start(apiV1Group *echo.Group, secret string) {
func (s *APIV1Service) Start(apiGroup *echo.Group, secret string) {
apiV1Group := apiGroup.Group("/api/v1")
s.registerSystemRoutes(apiV1Group)
s.registerAuthRoutes(apiV1Group, secret)
s.registerUserRoutes(apiV1Group)
s.registerShortcutRoutes(apiV1Group)
redirectorGroup := apiGroup.Group("/o")
s.registerRedirectorRoutes(redirectorGroup)
}