Skip to content

Commit

Permalink
Merge pull request #124 from openinfradev/TKS-802
Browse files Browse the repository at this point in the history
bugfix. remove http status '204 empty'
  • Loading branch information
ktkfree authored Aug 2, 2023
2 parents 0841ae5 + 8c83023 commit 763ffab
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 763ffab

Please sign in to comment.