Skip to content

Commit

Permalink
Refactor: HttpStatusCode
Browse files Browse the repository at this point in the history
  • Loading branch information
seheonnn committed Jan 11, 2024
1 parent e15f4a6 commit fce6bb2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public HttpStatus deleteNote(Long noteId) {
User user = principal.getUser();
Note note = noteRepository.findById(noteId).orElseThrow(() -> new RuntimeException());
if (note.getUser() != user)
return HttpStatus.BAD_GATEWAY;
return HttpStatus.BAD_REQUEST;
noteRepository.delete(note);
return HttpStatus.OK;
}
Expand Down

0 comments on commit fce6bb2

Please sign in to comment.