modified: serv_nginx/api_bb/internal/handlers/auth.go

modified:   serv_nginx/api_bb/internal/handlers/avatar.go
	modified:   serv_nginx/api_bb/internal/handlers/health.go
	modified:   serv_nginx/api_bb/internal/handlers/user.go
	modified:   serv_nginx/api_bb/internal/routes/routes.go
	deleted:    serv_nginx/bbvue/src/stores/counter.js
	modified:   serv_nginx/bbvue/src/views/Profile.vue
update chi to last, moove the routing from handlers to router.go
This commit is contained in:
2025-10-19 05:26:54 +05:00
parent c358ba01c9
commit ed8f0943c3
7 changed files with 23 additions and 72 deletions
@@ -14,7 +14,6 @@ import (
"api_bb/pkg/middleware"
"api_bb/pkg/utils"
"github.com/go-chi/chi/v5"
"go.uber.org/zap"
)
@@ -30,15 +29,6 @@ func NewUserHandler(userService service.UserService) *UserHandler {
}
}
func (h *UserHandler) Routes() chi.Router {
r := chi.NewRouter()
r.Get("/profile", h.GetProfile)
r.Post("/editProfile", h.UpdateProfile)
r.Get("/", h.GetUsers) // 👈 ДОБАВЛЯЕМ НОВЫЙ ЭНДПОЙНТ
return r
}
type UserResponse struct {
ID uint `json:"id"`
Email string `json:"email"`