Skip to content
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] #660 - 생명 타임라인 API 연결 #661

Merged
merged 2 commits into from
Oct 8, 2022

Conversation

yangsubinn
Copy link
Member

🔥Pull requests

⛳️ 작업한 브랜치

👷 작업한 내용

생명 타임라인 API 연결

🚨참고 사항

하다보니까 API쪽에 나중에 좀 깔끔하게 정리할 수 있을 것 같은데 나중에 .. 나중에?

📸 스크린샷

기능 스크린샷
생명 타임라인

📟 관련 이슈

@yangsubinn yangsubinn added Feat 새로운 기능 구현 🦹t없e맑은水빈 우리 선배 이젠 타이니하지 않아 labels Oct 7, 2022
@yangsubinn yangsubinn self-assigned this Oct 7, 2022
Copy link
Member

@hyun99999 hyun99999 left a comment

Choose a reason for hiding this comment

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

8일전까지.. 하셨군요 결국,, 🤥

Comment on lines +16 to +21
struct Timeline: Codable {
let title, content: String
let profiles: [String]?
let day: String
let isNew: Bool
}
Copy link
Member

Choose a reason for hiding this comment

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

데이터를 가지고 cell 을 초기화해주는 initCell()에서는 profiles 에 대해서 [String?] 자료형을 사용하셔서 만약에 서버에서 profiles 가 없을 때는 값자체를 보내주지 않는다고 하면 위와 같이 작성하는게 맞을 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

아아 그러네여 서버 데이터 보니까 아예 안오더라구여! initCell부분 수정할게여

Comment on lines +348 to +360
func fetchTimeline(roomID: Int, completion: @escaping(NetworkResult<Any>) -> Void) {
roomProvider.request(.timeLineFetch(roomID: roomID)) { result in
switch result {
case .success(let response):
let statusCode = response.statusCode
let data = response.data
let networkResult = self.judgeFetchTimelineStatus(by: statusCode, data)
completion(networkResult)
case .failure(let err):
print(err)
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

풀리퀘에서 언급한 내용이 judgeStatus 로 제네릭사용해서 리펙토링하면 좋겠다는걸까용? 어떤 부분이 또 있을까요!

Copy link
Member Author

Choose a reason for hiding this comment

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

예 ! 요 부분이 좀 중복되는 것 같아서 리팩하면 좋을 것 같았고 아래서 언급한 부분 겹치는 거 생각했어여 !

@@ -168,7 +173,7 @@ extension RoomService: TargetType {
return Const.Header.authorizationHeader()
case .leaveRoom:
return Const.Header.authorizationHeader()
case .readRoom:
case .readRoom, .timeLineFetch:
Copy link
Member

Choose a reason for hiding this comment

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

일부로 다 개별적으로 해두긴 했는데 어차피 이게 쉽게 바뀔 것 같지 않고, 당시에는 바뀌면 일일히 다시 분리해줘야해서 그랬는데 그럴 가능성이 낮아보여요 지금은! 그래서 요것도 겹칠 수 있으면 겹쳐두는 것도 좋을 것 같습니당
나중에 서버 쪽 리펙하게된다면 같이 고려해봐요

Copy link
Member

@L-j-h-c L-j-h-c left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 👍 👍

@yangsubinn yangsubinn merged commit ccd5953 into TeamSparker:develop Oct 8, 2022
@yangsubinn yangsubinn deleted the feature/#660 branch October 11, 2022 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 🦹t없e맑은水빈 우리 선배 이젠 타이니하지 않아
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 생명 타임라인 조회 api 연결
3 participants