Skip to content

Commit

Permalink
bugfix. remove http status '204 empty'
Browse files Browse the repository at this point in the history
  • Loading branch information
ktkfree committed Aug 2, 2023
1 parent 0841ae5 commit 8c83023
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions internal/delivery/http/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ func (u UserHandler) List(w http.ResponseWriter, r *http.Request) {
}
users, err := u.usecase.ListWithPagination(r.Context(), organizationId, pg)
if err != nil {
if _, status := httpErrors.ErrorResponse(err); status == http.StatusNotFound {
ResponseJSON(w, r, http.StatusNoContent, domain.ListUserResponse{})
return
}

log.ErrorfWithContext(r.Context(), "error is :%s(%T)", err.Error(), err)
ErrorJSON(w, r, err)
return
Expand Down
3 changes: 0 additions & 3 deletions internal/repository/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ func (r *UserRepository) ListWithPagination(pg *pagination.Pagination, organizat
log.Errorf("error is :%s(%T)", res.Error.Error(), res.Error)
return nil, res.Error
}
if res.RowsAffected == 0 {
return nil, httpErrors.NewNotFoundError(httpErrors.NotFound, "", "")
}

var out []domain.User
for _, user := range users {
Expand Down

0 comments on commit 8c83023

Please sign in to comment.