File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
src/main/java/devping/nnplanner/domain Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,10 @@ public AuthResponseDTO loginGoogle(GoogleLoginRequestDTO googleLoginRequestDTO)
143143 User user = userRepository .findByEmail (email )
144144 .orElseThrow (() -> new CustomException (ErrorCode .NOT_FOUND ));
145145
146+ if (user .getLoginType () == LoginType .LOCAL ) {
147+ throw new CustomException (ErrorCode .ALREADY_EMAIL );
148+ }
149+
146150 String accessToken = jwtUtil .createAccessToken (email );
147151 String refreshToken = jwtUtil .createRefreshToken (user .getUserId (), email );
148152
Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ public class MonthMenuService {
6161 public List <MonthMenuAutoResponseDTO > createHospitalMonthMenuAuto (
6262 MonthMenuAutoRequestDTO requestDTO ) {
6363
64+ if (!menuCategoryRepository .existsByMajorCategoryAndMinorCategory (
65+ requestDTO .getMajorCategory (), requestDTO .getMinorCategory ())) {
66+ throw new CustomException (ErrorCode .BAD_REQUEST );
67+ }
68+
6469 switch (requestDTO .getMajorCategory ()) {
6570 case "병원" -> {
6671
You can’t perform that action at this time.
0 commit comments