-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 스플레시 추가 및 유저 생성 api 연결 #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다.
이벤트 방출이 안되는 부분은 남긴 리뷰 확인 부탁드립니다.
UserManager.setupUserUUID() | ||
let router = SplashRouter(navigationController) | ||
self.navigationController.setNavigationBarHidden(true, animated: false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
스플래시 뷰가 생겨서 SplashViewModel에서 첫 사용자인지 확인을 하면 더 좋겠네요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 요부분 useCase 변경하고 SplashViewModel에서 checkUserInfo 호출하도록 수정했습니다~!
082efa7
public func checkUserInfo() async throws -> UserDetail {
if UserInfo.shared.deviceId.isEmpty {
return try await createUser()
} else {
return try await getUserDetail()
}
}
import PPACModels | ||
|
||
public protocol CreateUserUseCase { | ||
var userRepository: UserRepository { get set } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 protocol에서 repository을 알 필요가 있을까요??? get set으로 하신 이유가 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
으음... 그렇네요 protocol에서 삭제했습니답! 082efa7
var urlRequest = URLRequest(url: url).append(body: parameter) | ||
urlRequest.httpMethod = httpMethod.rawValue.uppercased() | ||
|
||
var defaultHeaders = [ | ||
"x-device-id": UserManager.uuid, | ||
"accept": "application/json", | ||
"Content-Type": "application/json" | ||
] | ||
|
||
if let additionalHeaders = headers { | ||
for (key, value) in additionalHeaders { | ||
defaultHeaders[key] = value | ||
} | ||
|
||
urlRequest.allHTTPHeaderFields = defaultHeaders | ||
return urlRequest | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헤더에 직접적으로 UserManager를 통해 uuid를 삽입하는 것보다는 interceptor 구현해주고, networkmanager에 삽입시켜주는 형식이 더 좋을 듯 합니다
|
||
// MARK: - Properties | ||
@ObservedObject private var viewModel: SplashViewModel | ||
@State private var cancleable = Set<AnyCancellable>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오타
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 요거 필요없어서 삭제했습니다!
확인감사합니당~ 082efa7
} | ||
|
||
private func bindViewModel() { | ||
viewModel.$state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state가 이벤트 방출하는 시점이 함수가 불리는 시점보다 앞인 것 같습니다. 그리고 "뷰를 꺼라"는 명령은 viewmodel에 있는 것이 더 어울릴 것 같네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵! 요것 state에 isVisible 필드 넣어서 사용하는 걸로 수정했습니다!
082efa7
func popView() | ||
func showMainTabView() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
popView가 showMainTabView와 분리되어 있는 이유가 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fd26d68
to
082efa7
Compare
- useCase 수정 - UserManager 수정
feat: CheckUserInfo 네이밍 변경 (#41)
082efa7
to
7699892
Compare
What is this PR? 🔍
이슈
설명
Changes 📝
memeLevel은 종난오빠가 써주겠져?
Screenshot 📸
To Reviewers 🙏
혹시 아시는 분 있으면 얘기해주시면 따봉드립니다
우선은 start finish로 넣었는데 좋은 네이밍이나 방식 있으면 얘기해주세여 지금은 빨리 PR 올리가 갈겁니다!!!!🤸♂️