Skip to content

Commit

Permalink
RAC-426 feat : 튜토리얼 상태 업데이트 API 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ywj9811 committed Aug 22, 2024
1 parent 6ef7410 commit a48d846
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public void updateInfo(User user, UserInfoRequest userInfoRequest) {
userUpdateService.updateInfo(user, userInfoRequest);
}

public void tutorialFin(User user) {
userUpdateService.tutorialFin(user);
}

@Transactional(readOnly = true)
public Boolean duplicatedNickName(String nickName) {
return userGetService.byNickName(nickName).isEmpty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public boolean isTutorial() {
return this.isTutorial;
}

public void tutorialFin() {
this.isTutorial = true;
}

public boolean isDefaultProfile(List<String> defaultProfile) {
return defaultProfile.contains(profile);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ public void updateSeniorUserAccount(User user, SeniorMyPageUserAccountRequest my
public void updateRestore(User user) {
user.restoreDelete();
}

public void tutorialFin(User user) {
user.tutorialFin();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ public class UserController {
private final UserMyPageUseCase myPageUseCase;
private final UserManageUseCase manageUseCase;

@PatchMapping("/me/tutorial")
@Operation(summary = "튜토리얼 완료시 상태 업데이트")
public ResponseEntity<ResponseDto<Void>> updateTutorialFin(@AuthenticationPrincipal User user) {
manageUseCase.tutorialFin(user);
return ResponseEntity.ok(create(UserResponseCode.USER_UPDATE.getCode(), UserResponseMessage.UPDATE_USER_INFO.getMessage()));
}

@GetMapping("/me")
@Operation(summary = "사용자 마이페이지 정보 조회 | 토큰 필요", description = "닉네임, 프로필")
public ResponseEntity<ResponseDto<UserMyPageResponse>> getUserInfo(@AuthenticationPrincipal User user) {
Expand Down

0 comments on commit a48d846

Please sign in to comment.