Skip to content

Commit

Permalink
[FIX] #555 지원시 알림 채널 SLACK 추가되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
AYoungSn committed Mar 19, 2024
1 parent 65fbc1a commit d94aff4
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import gg.data.recruit.recruitment.Recruitments;
import gg.data.recruit.recruitment.enums.InputType;
import gg.data.user.User;
import gg.data.user.type.SnsType;
import gg.recruit.api.user.service.param.FindApplicationDetailParam;
import gg.recruit.api.user.service.param.RecruitApplyFormParam;
import gg.recruit.api.user.service.param.RecruitApplyParam;
Expand Down Expand Up @@ -66,7 +67,11 @@ public Long recruitApply(RecruitApplyParam param) {
throw new DuplicationException("이미 지원한 공고입니다. applicationId = " + application.get().getId());
}
// application 생성
User user = userRepository.getById(param.getUserId());
User user = userRepository.findById(param.getUserId())
.orElseThrow(() -> new NotExistException("user not found"));
if (user.getSnsNotiOpt().equals(SnsType.NONE) || user.getSnsNotiOpt().equals(SnsType.EMAIL)) {
user.updateTypes(user.getRacketType(), SnsType.BOTH);
}
Recruitments recruitments = recruitmentRepository.getById(param.getRecruitId());
Application newApplication = applicationRepository.save(new Application(user, recruitments));
for (RecruitApplyFormParam form :
Expand Down

0 comments on commit d94aff4

Please sign in to comment.