Skip to content

[Feat] #48 - 전체적인 플로우 연결, 유저 플로우 리팩토링, 마이페이지 API 연결#64

Merged
L-j-h-c merged 17 commits intoTeamRecorDream:developfrom
L-j-h-c:feature/#48-MyPageDomainData
Dec 20, 2022
Merged

[Feat] #48 - 전체적인 플로우 연결, 유저 플로우 리팩토링, 마이페이지 API 연결#64
L-j-h-c merged 17 commits intoTeamRecorDream:developfrom
L-j-h-c:feature/#48-MyPageDomainData

Conversation

@L-j-h-c
Copy link
Copy Markdown
Contributor

@L-j-h-c L-j-h-c commented Dec 19, 2022

👻 작업한 내용

🎤 1. 전체적인 플로우 연결

LoginVC, SplashVC, HomeVC에 대한 팩토리 메서드를 추가했습니다.

로그인, 로그아웃, 회원탈퇴, 자동로그인에 대한 화면전환 플로우를 작성했습니다.

📸 2. 유저 플로우 리팩토링

토큰 재발급 API를 구현했습니다.

토큰 재발급 시 유효한 경우에만 자동로그인 되도록 처리헀습니다.

DefaultUserDefaultManager 클래스에서 Key.rawvalue를 입력해야 하던 것을 Key만 입력할 수 있도록 수정했습니다. rawvalue를 사용할 경우 자동완성이 되지 않기에 해당 방식으로 변경했습니다.

🧑‍🦱 3. 마이페이지 API 연결

로그아웃 API를 구현했습니다.

회원탈퇴 API를 구현했습니다.

닉네임 변경 API를 구현했습니다.

푸시알림 OnOff API를 구현했습니다.

푸시알림 시간 설정 API를 구현했습니다.

위의 API에 대한 비즈니스 로직을 구현하고 리팩토링했습니다.

📮 관련 이슈

@L-j-h-c L-j-h-c added 록시보이 🌽 담당자 feat 구현·개선 사항에 관련된 내용입니다. labels Dec 19, 2022
@L-j-h-c L-j-h-c self-assigned this Dec 19, 2022
…m-iOS into feature/TeamRecorDream#48-MyPageDomainData

# Conflicts:
#	RecorDream-iOS/Projects/Presentation/Sources/Factory/ViewControllerFactory.swift
#	RecorDream-iOS/Projects/Presentation/Sources/MainTabBarScene/Home/View/HomeVC.swift
#	RecorDream-iOS/Projects/Presentation/Sources/MainTabBarScene/MainTabBar/MainTabBarController.swift
Suyeon9911
Suyeon9911 previously approved these changes Dec 20, 2022
Copy link
Copy Markdown
Member

@Suyeon9911 Suyeon9911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어우 너무 수고하셨습니다 !! 뚝딱해내시는군요.. 굿굿 !! 다음엔 꼭 PR분리 부탁드립니당 ㅋㅎㅋㅎㅋㅎㅋ 보느라 눈 빠질뻔 해써욜... 🥲🥲🥲🥲🥲

@L-j-h-c L-j-h-c merged commit a7777b9 into TeamRecorDream:develop Dec 20, 2022
Comment on lines +51 to +63
let isStillValidToken = (response.status == 403)
if isStillValidToken {
observer.onNext(true)
return
}

guard let token = response.data else {
observer.onNext(false)
return
}
DefaultUserDefaultManager.set(value: token.accessToken, keyPath: .accessToken)
DefaultUserDefaultManager.set(value: token.refreshToken, keyPath: .refreshToken)
observer.onNext(true)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

슬랙에서 논의하셨던 + 줌에서 말씀해주셨던 부분이네요!
저는 단순히 토큰 재발급 API를 앱 실행 시마다 호출하여 다시 로그인하는 방식을 생각했는데, 이렇게 처리하게 되면 백・프론트 모두에서 효율적이겠네요... 배워갑니다 👍

Comment on lines +102 to +107
.do(onNext: { isActive in
guard isActive else {
observer.onNext(false)
return
}
})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 토글 on/off 동작이 연속적으로 수행될 때를 잡아주는... 그런 부분인가요...???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 구현·개선 사항에 관련된 내용입니다. 록시보이 🌽 담당자

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 마이페이지 API 연결

3 participants