Skip to content

Commit

Permalink
refactor - #51 챌린지 업데이트하는 메소드 이름 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jumining committed Jan 17, 2024
1 parent 95ddb2c commit fbb5d70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ChallengeController {
public ResponseEntity<ApiResponse<?>> orderAddChallenge(Principal principal,
@RequestHeader("OS") final String os,
@RequestBody final ChallengeRequest request) {
challengeService.addChallengeForPeriodWithInfo(
challengeService.updateChallengeForPeriodWithInfo(
challengeService.addChallenge(
IdConverter.getUserId(principal),
request.period(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Challenge addChallenge(Long userId, Integer period, Long goalTime) {
}

@Transactional
public Challenge addChallengeForPeriodWithInfo(Challenge challenge, List<AppGoalTimeRequest> apps, String os) {
public Challenge updateChallengeForPeriodWithInfo(Challenge challenge, List<AppGoalTimeRequest> apps, String os) {
for (int count = 0; count < challenge.getPeriod(); count++) {
DailyChallenge dailyChallenge = dailyChallengeService.addDailyChallenge(challenge);
appService.addApps(dailyChallenge, apps, os);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public LoginResponse signup(String socialAccessToken, SocialSignUpRequest reques
OnboardingInfo onboardingInfo = registerOnboardingInfo(request);
User user = addUser(socialPlatform, socialId, request.name());

challengeService.addChallengeForPeriodWithInfo(
challengeService.updateChallengeForPeriodWithInfo(
challengeService.addChallenge(user.getId(),
request.challengeSignUpRequest().period(),
request.challengeSignUpRequest().goalTime()),
Expand Down

0 comments on commit fbb5d70

Please sign in to comment.