Skip to content

Commit

Permalink
Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
HoussemNasri authored May 17, 2024
1 parent 08b8c38 commit f0a1505
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@ public List<AnswerResponse> getAnswersOnQuestion(@PathVariable Long questionId)
@PostMapping("/questions/{questionId}/answers")
public ResponseEntity<AnswerResponse> postAnswer(@RequestBody PostAnswerRequest answerRequest, @PathVariable Long questionId,
Authentication authentication) {
return answersService.postAnswer(answerRequest, questionId, authentication).map(ResponseEntity::ok).orElse(ResponseEntity.badRequest().build());
return answersService.postAnswer(answerRequest, questionId, authentication)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.badRequest().build());
}

@GetMapping("/answers/{answerId}")
public ResponseEntity<AnswerResponse> getAnswer(@PathVariable Long answerId) {
return answersService.getAnswerById(answerId).map(ResponseEntity::ok).orElse(ResponseEntity.notFound().build());
return answersService.getAnswerById(answerId)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}

/**
Expand Down

0 comments on commit f0a1505

Please sign in to comment.