add: db tx commit and rollback implementation

This commit is contained in:
mario
2025-05-15 15:42:33 +07:00
parent 264435f67e
commit d2ec8c0f07
11 changed files with 216 additions and 60 deletions

View File

@@ -88,8 +88,8 @@ 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()
// Registration endpoint
registerService := service.NewRegisterService(logger)
registerHandler := handlers.NewRegisterHandler(logger, registerService)
r.Post("/register", registerHandler.Register)