File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/main/java/sopt/org/hmh/domain/user Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
package sopt .org .hmh .domain .user .controller ;
2
2
3
+ import jakarta .validation .Valid ;
3
4
import java .time .LocalDate ;
4
5
import lombok .RequiredArgsConstructor ;
5
6
import org .springframework .format .annotation .DateTimeFormat ;
@@ -63,7 +64,7 @@ public ResponseEntity<BaseResponse<EmptyJsonResponse>> orderWithdraw(@UserId fin
63
64
@ PostMapping ("/daily/lock" )
64
65
@ Override
65
66
public ResponseEntity <BaseResponse <EmptyJsonResponse >> orderChangeRecentLockDate (
66
- @ UserId final Long userId , @ RequestBody final LockDateRequest request ) {
67
+ @ UserId final Long userId , @ Valid @ RequestBody final LockDateRequest request ) {
67
68
userService .changeRecentLockDate (userId , request .lockDate ());
68
69
return ResponseEntity
69
70
.status (UserSuccess .CHANGE_RECENT_LOCK_DATE_SUCCESS .getHttpStatus ())
Original file line number Diff line number Diff line change 1
1
package sopt .org .hmh .domain .user .dto .request ;
2
2
3
+ import jakarta .validation .constraints .NotNull ;
3
4
import java .time .LocalDate ;
4
5
import lombok .AccessLevel ;
5
6
import lombok .NoArgsConstructor ;
@@ -10,6 +11,7 @@ public class UserRequest {
10
11
11
12
public record LockDateRequest (
12
13
@ DateTimeFormat (pattern = "yyyy-MM-dd" )
14
+ @ NotNull (message = "잠금 날짜는 null일 수 없습니다." )
13
15
LocalDate lockDate
14
16
) {
15
17
}
You can’t perform that action at this time.
0 commit comments