feat: 管理后台登录
Some checks failed
Backend Deploy (Go + Docker) / deploy (push) Successful in 1m4s
Extension Build & Release / build (push) Failing after 46s

This commit is contained in:
zs
2026-03-02 23:54:59 +08:00
parent 4e5147fb13
commit d2b330c0c9
7 changed files with 115 additions and 5 deletions

View File

@@ -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) {