Skip to content

Commit fd7127e

Browse files
authored
Merge pull request #221 from devping-kr/dev
deploy: 배포
2 parents 9d98375 + 897ea9f commit fd7127e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/main/java/devping/nnplanner/domain/auth/service/AuthService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/main/java/devping/nnplanner/domain/monthmenu/service/MonthMenuService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)