add: register and login with DB query AND some struct type correction
This commit is contained in:
@@ -88,6 +88,11 @@ func SetupRouter(cfg *config.Config, logger *zap.Logger) http.Handler {
|
||||
r.Post("/refresh", authHandler.RefreshToken)
|
||||
r.Post("/logout", authHandler.Logout)
|
||||
|
||||
// Registration endpoint
|
||||
registerService := service.NewRegisterService()
|
||||
registerHandler := handlers.NewRegisterHandler(logger, registerService)
|
||||
r.Post("/register", registerHandler.Register)
|
||||
|
||||
// ShortLink authentication - no auth required
|
||||
shortLinkHandler := handlers.NewShortLinkHandler(logger, shortLinkService)
|
||||
r.Post("/shortlink", shortLinkHandler.ShortLinkAuth)
|
||||
|
||||
Reference in New Issue
Block a user