File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/main/java/com/moplus/moplus_server/client/submit/service Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,14 @@ public class ProblemsGetService {
39
39
private final ProblemSetRepository problemSetRepository ;
40
40
private final ChildProblemSubmitRepository childProblemSubmitRepository ;
41
41
private final ChildProblemRepository childProblemRepository ;
42
+ private static final int MIN_MONTH = 1 ;
43
+ private static final int MAX_MONTH = 12 ;
42
44
43
45
@ Transactional (readOnly = true )
44
46
public List <AllProblemGetResponse > getAllProblem (int year , int month ) {
45
47
Long memberId = 1L ;
46
48
47
- if (month < 1 || month > 12 ) {
49
+ if (month < MIN_MONTH || month > MAX_MONTH ) {
48
50
throw new InvalidValueException (ErrorCode .INVALID_MONTH_ERROR );
49
51
}
50
52
LocalDate startDate = LocalDate .of (year , month , 1 );
You can’t perform that action at this time.
0 commit comments