feat: remove frontend bindings
This commit is contained in:
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user