feat: 管理后台登录
This commit is contained in:
@@ -60,6 +60,9 @@ func main() {
|
||||
userSvc := service.NewUserService(userRepo)
|
||||
userHandler := handler.NewUserHandler(userSvc)
|
||||
|
||||
authSvc := service.NewAuthService(userRepo)
|
||||
authHandler := handler.NewAuthHandler(authSvc)
|
||||
|
||||
profileRepo := repository.NewProductProfileRepository(db)
|
||||
profileSvc := service.NewProductProfileService(profileRepo)
|
||||
profileHandler := handler.NewProductProfileHandler(profileSvc)
|
||||
@@ -120,6 +123,7 @@ func main() {
|
||||
r.Route("/api/v1", func(r chi.Router) {
|
||||
// Public routes
|
||||
r.Post("/users/register", userHandler.Register)
|
||||
r.Post("/auth/login", authHandler.Login)
|
||||
|
||||
// Protected routes
|
||||
r.Group(func(r chi.Router) {
|
||||
|
||||
Reference in New Issue
Block a user