Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:go-park-mail-ru/2023_2_Hamster i…
Browse files Browse the repository at this point in the history
…nto develop
  • Loading branch information
CodeMaster482 committed Dec 20, 2023
2 parents 1bb4595 + 0b724c5 commit a9d1376
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/microservices/user/delivery/http/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ func (h *Handler) UpdatePhoto(w http.ResponseWriter, r *http.Request) { // need
// @Failure 400 {object} ResponseError "Client error"
// @Failure 401 {object} ResponseError "Unauthorized user"
// @Failure 403 {object} ResponseError "Forbidden user"
// @Failure 404 {object} ResponseError "No user found with this login"
// @Failure 500 {object} ResponseError "Server error"
// @Router /api/user/addUserInAccount [post]
func (h *Handler) AddUserInAccount(w http.ResponseWriter, r *http.Request) {
Expand All @@ -400,7 +401,7 @@ func (h *Handler) AddUserInAccount(w http.ResponseWriter, r *http.Request) {
if err := h.userService.AddUserInAccount(r.Context(), accountInput, user.ID); err != nil {
var errNoSuchUser *models.NoSuchUserInLogin
if errors.As(err, &errNoSuchUser) {
commonHttp.ErrorResponse(w, http.StatusBadRequest, err, transfer_models.UserNotFoundLogin, h.logger)
commonHttp.ErrorResponse(w, http.StatusNotFound, err, transfer_models.UserNotFoundLogin, h.logger)
return
}

Expand Down

0 comments on commit a9d1376

Please sign in to comment.