-
Notifications
You must be signed in to change notification settings - Fork 0
[Refactor] #111 - RegisterNormalView Refactor #116
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
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.
수고하셨서용!!!! 굿뜨
VC보니까 Input, Output 구분 되게 잘해놓으신거 같더라구요??
제가 지금 그 부분에서 어려움을 겪고 있어서 ....,,, 제 코드 보고 리뷰 남겨주십쇼 참고로 Input으로 어떻게 빼야할지 모르겠음 ㅠㅠ
| func getNovelInfo(novelId: Int) -> Single<NovelResult> { | ||
| do { | ||
| let request = try makeHTTPRequest(method: .get, | ||
| path: URLs.Novel.getNovelInfo(novelId: novelId), | ||
| headers: APIConstants.testTokenHeader, | ||
| body: nil) | ||
|
|
||
| NetworkLogger.log(request: request) | ||
|
|
||
| return urlSession.rx.data(request: request) | ||
| .map {NovelResult( | ||
| newNovelResult: try? JSONDecoder().decode(NewNovelResult.self, from: $0), | ||
| editNovelResult: try? JSONDecoder().decode(EditNovelResult.self, from: $0)) | ||
| } | ||
| .asSingle() | ||
| } catch { | ||
| return Single.error(error) | ||
| } |
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.
W3;
do-catch 사용 굿굿!!! 나두 이렇게 처리했다능 !!!
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.
W3
굳
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.
우왕굿!
| static func postUserNovel(novelId: Int) -> String { | ||
| return "/user-novels/\(novelId)" | ||
| } | ||
| static func patchUserNovel(userNovelId: Int) -> String { | ||
| return "/user-novels/\(userNovelId)" | ||
| } |
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.
👍
|
|
||
| private func setHieararchy() { |
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.
W1;
setHierarchy 같은데!!! 오타난듯하오 수정해주셍요~
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.
대박이다 이걸 어떻게 발견했지 고마워용!!!
ena-isme
left a comment
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.
좋아요 깔꼼하네용
| func getNovelInfo(novelId: Int) -> Single<NovelResult> { | ||
| do { | ||
| let request = try makeHTTPRequest(method: .get, | ||
| path: URLs.Novel.getNovelInfo(novelId: novelId), | ||
| headers: APIConstants.testTokenHeader, | ||
| body: nil) | ||
|
|
||
| NetworkLogger.log(request: request) | ||
|
|
||
| return urlSession.rx.data(request: request) | ||
| .map {NovelResult( | ||
| newNovelResult: try? JSONDecoder().decode(NewNovelResult.self, from: $0), | ||
| editNovelResult: try? JSONDecoder().decode(EditNovelResult.self, from: $0)) | ||
| } | ||
| .asSingle() | ||
| } catch { | ||
| return Single.error(error) | ||
| } |
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.
W3
굳
hyowon612
left a comment
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.
대박이네예 완젼 짱짱 수고했삼👍
쇽쇽샥샥.. 열시미 해볼게요 ㅋ 👼🏻
| func getNovelInfo(novelId: Int) -> Single<NovelResult> { | ||
| do { | ||
| let request = try makeHTTPRequest(method: .get, | ||
| path: URLs.Novel.getNovelInfo(novelId: novelId), | ||
| headers: APIConstants.testTokenHeader, | ||
| body: nil) | ||
|
|
||
| NetworkLogger.log(request: request) | ||
|
|
||
| return urlSession.rx.data(request: request) | ||
| .map {NovelResult( | ||
| newNovelResult: try? JSONDecoder().decode(NewNovelResult.self, from: $0), | ||
| editNovelResult: try? JSONDecoder().decode(EditNovelResult.self, from: $0)) | ||
| } | ||
| .asSingle() | ||
| } catch { | ||
| return Single.error(error) | ||
| } |
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.
우왕굿!
| animated: true) | ||
| } | ||
|
|
||
| func moveToNovelDetailVC(userNovelId: Int) { |
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.
W3
VC로 통일하자구 했던가용? 컨벤션에는 약어 사용하지 말라구 했던거로 기억해서!!
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.
아고 넵 약어 사용 빼겠습니다~~
⭐️Issue
#111
🌟Motivation
🌟Key Changes
멘토님 피드백을 바탕으로 수정했으며, 중복된 코드 제거, UIView에 들어있던 비즈니스 로직 ViewController로 이동 등의 변화가 있습니다.
멘토님 피드백 기반
함께 회의했던 것들 기반
개인적으로 아쉬웠던 부분들
🌟Simulation
🌟To Reviewer
🌟To do
🌟Reference