From 80a6efad6c782d95da1681d525d268dc70bb489f Mon Sep 17 00:00:00 2001 From: seongha <11pi885@gmail.com> Date: Mon, 11 Mar 2024 14:17:27 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20getPuzzle=EC=9D=98=20=20answer=20defa?= =?UTF-8?q?ult=20=EA=B0=92=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/puzzle/PuzzleQueryController.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleQueryController.java b/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleQueryController.java index 0faa40b..e7743e9 100644 --- a/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleQueryController.java +++ b/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleQueryController.java @@ -38,9 +38,8 @@ public class PuzzleQueryController { @GetMapping("") public ResponseEntity getPuzzleById( @RequestParam(value = "id", required = true) String id, - @RequestParam(value = "answer", required = true) String answer + @RequestParam(value = "answer", required = false, defaultValue = "false") String answer ) { - PuzzleDto puzzleDto = puzzleService.getPuzzleById(id, answer); return ResponseEntity.status(HttpStatus.OK) .body(ApiResponse.success(puzzleDto)); @@ -64,9 +63,7 @@ public ResponseEntity getPuzzleListByCategoryIds( @PostMapping("/check") public ResponseEntity checkWords( @RequestBody CheckWordsDto checkWordsDto) { - boolean isAns = wordsService.checkWords(checkWordsDto); - return ResponseEntity.status(HttpStatus.OK) .body(ApiResponse.success( IsAnswerDto.builder() @@ -78,9 +75,7 @@ public ResponseEntity checkWords( @GetMapping("/categories") public ResponseEntity getCategories() { - List categoryDtos = categoryService.getCategories(); - return ResponseEntity.status(HttpStatus.OK) .body(ApiResponse.success( categoryDtos