-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: 요청 Dto 검증 과정 추가 (#47) #49
Conversation
@@ -49,8 +49,8 @@ public ApiResponse<Void> updateFood(UpdateFoodDto updateFoodDto){ | |||
//음식 삭제 | |||
@Operation(summary = "[음식] 음식 정보 삭제",description = "음식에 대한 정보를 삭제합니다.") | |||
@DeleteMapping("/{foodId}/delete") | |||
public ApiResponse<Void> deleteFood(@PathVariable Long foodId){ | |||
foodService.deleteFood(foodId); | |||
public ApiResponse<Void> deleteFood(@PathVariable Long foodId, @RequestHeader Long userId){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redis는 key value쌍으로 캐싱을 하기 때문에 userId에 대한 정보가 받아와야 하죠~
private String token; | ||
|
||
@NotBlank(message = "nickName은 비어있을 수 없습니다.") | ||
@NotBlank(message = MessageUtil.NOT_BLANK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dto에 validation을 추가함으로써 요청의 무결성을 보장할 수 있을 것 같습니다!
유효성 검사 로직을 추가함으로써 좀 더 유효한 요청이 들어올 확률이 높아질 것 같습니다! 수고하셨습니다~ |
Validation
기타