On branch main
modified: internal/database/psql_db.go modified: internal/domain/auth/dto.go modified: internal/domain/auth/handler.go modified: internal/domain/auth/router.go modified: internal/domain/auth/servcie.go new file: internal/models/password_reset.go modified: internal/repository/account_repository.go modified: internal/repository/account_repository_impl.go auth domain is implemented but not tested
This commit is contained in:
@@ -35,7 +35,9 @@ func RegisterRoutes(r chi.Router, db *gorm.DB, jwtSecret string) {
|
||||
r.Post("/login", handler.Login)
|
||||
r.Post("/register", handler.Register)
|
||||
r.Post("/refresh", handler.RefreshToken)
|
||||
// r.Post("/reset-password", handler.ResetPassword)
|
||||
r.Post("/reset-password", handler.RequestPasswordReset)
|
||||
r.Post("/reset-password/confirm", handler.ConfirmPasswordReset)
|
||||
r.Post("/mobile/login", handler.MobileLogin) // Для мобильных приложений
|
||||
})
|
||||
|
||||
// Защищенные маршруты (требуют аутентификации)
|
||||
@@ -43,9 +45,7 @@ func RegisterRoutes(r chi.Router, db *gorm.DB, jwtSecret string) {
|
||||
r.Use(middleware.AuthMiddleware(jwtSecret))
|
||||
|
||||
r.Post("/logout", handler.Logout)
|
||||
r.Get("/profile", handler.GetProfile)
|
||||
r.Put("/profile", handler.UpdateProfile)
|
||||
r.Post("/change-password", handler.ChangePassword)
|
||||
r.Post("/change-password", handler.RequestPasswordReset)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user