feat: remove frontend bindings

This commit is contained in:
2025-05-20 18:45:54 +02:00
parent 55ccd8ea8e
commit 9267cf2618
2 changed files with 13 additions and 17 deletions

View File

@ -25,7 +25,7 @@ func NewAuthHandler(repo *repository.Queries) *AuthHandler {
} }
} }
func (h *AuthHandler) RegisterRoutes(router chi.Router, api chi.Router) { func (h *AuthHandler) RegisterRoutes(api chi.Router) {
api.Get("/profile", h.getProfile) api.Get("/profile", h.getProfile)
api.Post("/login", h.login) api.Post("/login", h.login)
} }
@ -109,4 +109,3 @@ func (h *AuthHandler) login(w http.ResponseWriter, r *http.Request) {
web.Error(w, "failed to encode response", http.StatusInternalServerError) web.Error(w, "failed to encode response", http.StatusInternalServerError)
} }
} }

View File

@ -20,9 +20,7 @@ func NewUserHandler(repo *repository.Queries) *UserHandler {
} }
} }
func (h *UserHandler) RegisterRoutes(router chi.Router, api chi.Router) { func (h *UserHandler) RegisterRoutes(api chi.Router) {
router.Get("/login", h.loginPage)
router.Get("/register", h.registerPage)
api.Post("/register", h.register) api.Post("/register", h.register)
} }
@ -92,4 +90,3 @@ func (h *UserHandler) register(w http.ResponseWriter, r *http.Request) {
web.Error(w, "failed to encode response", http.StatusInternalServerError) web.Error(w, "failed to encode response", http.StatusInternalServerError)
} }
} }