Skip to content

Commit

Permalink
refactor - #122 가독성을 위한 네이밍 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh committed Jun 18, 2024
1 parent d4eb82a commit d712315
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class AuthFacade {

private final KakaoLoginService kakaoLoginService;
private final AppleOAuthProvider appleOAuthProvider;

private final ChallengeFacade challengeFacade;
private final ChallengeAppService challengeAppService;
private final TokenService tokenService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ResponseEntity<BaseResponse<DailyChallengeResponse>> orderGetDailyChallen
public ResponseEntity<BaseResponse<?>> orderAddApps(@UserId final Long userId,
@RequestHeader("OS") final String os,
@RequestBody @Valid final ChallengeAppArrayRequest requests) {
challengeFacade.addApps(userId, requests.apps(), os);
challengeFacade.addAppsToCurrentChallenge(userId, requests.apps(), os);

return ResponseEntity
.status(AppSuccess.ADD_APP_SUCCESS.getHttpStatus())
Expand All @@ -73,7 +73,7 @@ public ResponseEntity<BaseResponse<?>> orderAddApps(@UserId final Long userId,
public ResponseEntity<BaseResponse<?>> orderRemoveApp(@UserId final Long userId,
@RequestHeader("OS") final String os,
@RequestBody @Valid final AppRemoveRequest request) {
challengeFacade.removeApp(userId, request.appCode(), os);
challengeFacade.removeAppFromCurrentChallenge(userId, request.appCode(), os);

return ResponseEntity
.status(AppSuccess.REMOVE_APP_SUCCESS.getHttpStatus())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ private Integer calculateTodayIndex(LocalDateTime challengeCreateAt, int period)
}

@Transactional
public void addApps(Long userId, List<ChallengeAppRequest> requests, String os) {
public void addAppsToCurrentChallenge(Long userId, List<ChallengeAppRequest> requests, String os) {
Challenge challenge = this.findCurrentChallengeByUserId(userId);
challengeAppService.addApps(challenge, requests, os);
}

@Transactional
public void removeApp(Long userId, String appCode, String os) {
public void removeAppFromCurrentChallenge(Long userId, String appCode, String os) {
Challenge challenge = this.findCurrentChallengeByUserId(userId);
challengeAppService.removeApp(challenge, appCode, os);
}
Expand Down

0 comments on commit d712315

Please sign in to comment.