[Feat] #48 - 전체적인 플로우 연결, 유저 플로우 리팩토링, 마이페이지 API 연결#64
Merged
L-j-h-c merged 17 commits intoTeamRecorDream:developfrom Dec 20, 2022
Merged
[Feat] #48 - 전체적인 플로우 연결, 유저 플로우 리팩토링, 마이페이지 API 연결#64L-j-h-c merged 17 commits intoTeamRecorDream:developfrom
L-j-h-c merged 17 commits intoTeamRecorDream:developfrom
Conversation
…m-iOS into feature/TeamRecorDream#48-MyPageDomainData
…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
previously approved these changes
Dec 20, 2022
Member
Suyeon9911
left a comment
There was a problem hiding this comment.
어우 너무 수고하셨습니다 !! 뚝딱해내시는군요.. 굿굿 !! 다음엔 꼭 PR분리 부탁드립니당 ㅋㅎㅋㅎㅋㅎㅋ 보느라 눈 빠질뻔 해써욜... 🥲🥲🥲🥲🥲
RecorDream-iOS/Projects/Data/Sources/Network/DataTransform/UserInfoTransform.swift
Show resolved
Hide resolved
RecorDream-iOS/Projects/Data/Sources/Repositories/DefaultAuthRepository.swift
Show resolved
Hide resolved
RecorDream-iOS/Projects/Data/Sources/Repositories/DefaultMyPageRepository.swift
Show resolved
Hide resolved
RecorDream-iOS/Projects/Presentation/Sources/MainTabBarScene/Home/View/HomeVC.swift
Show resolved
Hide resolved
RecorDream-iOS/Projects/Presentation/Sources/MainTabBarScene/Home/View/HomeVC.swift
Show resolved
Hide resolved
RecorDream-iOS/Projects/Presentation/Sources/MainTabBarScene/MyPage/View/MyPageVC.swift
Show resolved
Hide resolved
RecorDream-iOS/Projects/Presentation/Sources/AuthScene/Splash/View/SplashVC.swift
Show resolved
Hide resolved
RecorDream-iOS/Projects/Modules/RD-Network/Sources/Services/AuthService.swift
Show resolved
Hide resolved
Suyeon9911
approved these changes
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) |
Member
There was a problem hiding this comment.
슬랙에서 논의하셨던 + 줌에서 말씀해주셨던 부분이네요!
저는 단순히 토큰 재발급 API를 앱 실행 시마다 호출하여 다시 로그인하는 방식을 생각했는데, 이렇게 처리하게 되면 백・프론트 모두에서 효율적이겠네요... 배워갑니다 👍
Comment on lines
+102
to
+107
| .do(onNext: { isActive in | ||
| guard isActive else { | ||
| observer.onNext(false) | ||
| return | ||
| } | ||
| }) |
Member
There was a problem hiding this comment.
이 부분은 토글 on/off 동작이 연속적으로 수행될 때를 잡아주는... 그런 부분인가요...???
RecorDream-iOS/Projects/Presentation/Sources/MainTabBarScene/Home/View/HomeVC.swift
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👻 작업한 내용
🎤 1. 전체적인 플로우 연결
LoginVC, SplashVC, HomeVC에 대한 팩토리 메서드를 추가했습니다.
로그인, 로그아웃, 회원탈퇴, 자동로그인에 대한 화면전환 플로우를 작성했습니다.
📸 2. 유저 플로우 리팩토링
토큰 재발급 API를 구현했습니다.
토큰 재발급 시 유효한 경우에만 자동로그인 되도록 처리헀습니다.
DefaultUserDefaultManager 클래스에서 Key.rawvalue를 입력해야 하던 것을 Key만 입력할 수 있도록 수정했습니다. rawvalue를 사용할 경우 자동완성이 되지 않기에 해당 방식으로 변경했습니다.
🧑🦱 3. 마이페이지 API 연결
로그아웃 API를 구현했습니다.
회원탈퇴 API를 구현했습니다.
닉네임 변경 API를 구현했습니다.
푸시알림 OnOff API를 구현했습니다.
푸시알림 시간 설정 API를 구현했습니다.
위의 API에 대한 비즈니스 로직을 구현하고 리팩토링했습니다.
📮 관련 이슈