Skip to content

Commit

Permalink
fix : getPuzzle의 answer default 값 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Fixtar committed Mar 11, 2024
1 parent 33bbbb2 commit 80a6efa
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ public class PuzzleQueryController {
@GetMapping("")
public ResponseEntity<ApiResponse> 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));
Expand All @@ -64,9 +63,7 @@ public ResponseEntity<ApiResponse> getPuzzleListByCategoryIds(
@PostMapping("/check")
public ResponseEntity<ApiResponse> checkWords(
@RequestBody CheckWordsDto checkWordsDto) {

boolean isAns = wordsService.checkWords(checkWordsDto);

return ResponseEntity.status(HttpStatus.OK)
.body(ApiResponse.success(
IsAnswerDto.builder()
Expand All @@ -78,9 +75,7 @@ public ResponseEntity<ApiResponse> checkWords(

@GetMapping("/categories")
public ResponseEntity<ApiResponse> getCategories() {

List<CategoryDto> categoryDtos = categoryService.getCategories();

return ResponseEntity.status(HttpStatus.OK)
.body(ApiResponse.success(
categoryDtos
Expand Down

0 comments on commit 80a6efa

Please sign in to comment.