Skip to content

Commit

Permalink
๐ŸŒจ :: ์„ค๋ฌธ,๋‹ต๋ณ€ ํƒ€์ž… ์—†์œผ๋ฉด exception
Browse files Browse the repository at this point in the history
  • Loading branch information
4mjeo committed Dec 5, 2023
1 parent 5e95e44 commit 81c1690
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class AnswerSurveyService {
@Transactional
public void answerSurvey(AnswerSurveyRequest request) {
User user = userFacade.getCurrentUser();
if(request.getSurveyType() == null || request.getAnswerType() == null) {
throw new IllegalArgumentException("SurveyType and AnswerType must not null");
}

if(request.getSurveyType() == SurveyType.SOCIAL_TYPE) {
if(request.getAnswerType() == AnswerType.NEUTRAL)user.addSocialTypeScore(0);
Expand Down

0 comments on commit 81c1690

Please sign in to comment.