diff --git a/internal/api/handler/list.go b/internal/api/handler/list.go index a1040ca..d0fbb33 100644 --- a/internal/api/handler/list.go +++ b/internal/api/handler/list.go @@ -261,7 +261,7 @@ func (h *ListHandler) UpdateListItem(w http.ResponseWriter, r *http.Request) { // @Error 400 {object} response.ErrorResponse "failed to decode request body" // @Error 401 {object} response.ErrorResponse "not authorized" // @Error 500 {object} response.ErrorResponse "failed to update list item" -// @Router /api/v1/lists/item/{id} [post] +// @Router /api/v1/lists/items/{id} [post] func (h *ListHandler) SetListItemCompleted(w http.ResponseWriter, r *http.Request) { ctx := r.Context() diff --git a/internal/api/handler/user.go b/internal/api/handler/user.go index 16b16f5..57b7185 100644 --- a/internal/api/handler/user.go +++ b/internal/api/handler/user.go @@ -28,7 +28,7 @@ func NewUserHandler(userService *domain.UserService) *UserHandler { // @Success 201 {object} domain.User // @Error 400 {object} response.ErrorResponse "failed to decode request body" // @Error 500 {object} response.ErrorResponse "failed to create user" -// @Router /api/v1/user [post] +// @Router /api/v1/users [post] func (h *UserHandler) CreateUser(w http.ResponseWriter, r *http.Request) { ctx := r.Context() diff --git a/internal/api/router/router.go b/internal/api/router/router.go index 7fc45d1..4e19d74 100644 --- a/internal/api/router/router.go +++ b/internal/api/router/router.go @@ -47,8 +47,8 @@ func NewMux(cfg Config) http.Handler { apiMux.Handle("DELETE /lists/user", protected(listHandler.RemoveUserFromList)) apiMux.Handle("POST /lists/item", protected(listHandler.CreateListItem)) apiMux.Handle("PUT /lists/item", protected(listHandler.UpdateListItem)) - apiMux.Handle("POST /list/items/{id}", protected(listHandler.SetListItemCompleted)) - apiMux.Handle("GET /list/{id}", protected(listHandler.GetListItems)) + apiMux.Handle("POST /lists/items/{id}", protected(listHandler.SetListItemCompleted)) + apiMux.Handle("GET /lists/{id}", protected(listHandler.GetListItems)) mux := http.NewServeMux() mux.Handle("/api/v1/", http.StripPrefix("/api/v1", apiMux))