From fce6bb25c6d95f2513f5a181203e2493055815d0 Mon Sep 17 00:00:00 2001 From: seheonnn Date: Thu, 11 Jan 2024 14:14:31 +0900 Subject: [PATCH] Refactor: HttpStatusCode --- src/main/java/com/kim3ho1/yourprotein/service/FoodService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/kim3ho1/yourprotein/service/FoodService.java b/src/main/java/com/kim3ho1/yourprotein/service/FoodService.java index ff30256..5ae7771 100644 --- a/src/main/java/com/kim3ho1/yourprotein/service/FoodService.java +++ b/src/main/java/com/kim3ho1/yourprotein/service/FoodService.java @@ -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; }