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] #54 - 로그인, 메인, 리스트 서버통신 #62

Merged
merged 10 commits into from
Nov 13, 2021

Conversation

mini-min
Copy link
Member

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

  • 민재 담당 서버는 어떤거였나면?

    • [GET] 소셜 로그인
    • [GET] 메인/리스트 조회
    • [PUT] 명함 리스트 편집 완료
    • [DELETE] 자신의 명함 삭제
  • CardAPI, CardService 작성 (User, Card)

  • 네트워크 데이터 모델 생성

  • 각 뷰컨에 테스트 코드 작성 -> // FIXME로 워닝 발생 부분

💡Moya 초보 개발자 민군, 얼마든지 교수님들의 날카로운 지적 환영합니다💡

📮 관련 이슈

@mini-min mini-min added Minjae 🐻‍❄️ 민재 강남1타강사 작업 P1 / Priority High 우선순위 높음 Feat 새로운 기능 구현 labels Nov 12, 2021
@mini-min mini-min self-assigned this Nov 12, 2021
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.

아니... 진짜 선배야... 아니 ㅋㅋㅋㅋ 왤케 잘함
나 모야 첨 했을때 비하면 이 선배는 모야천재네;
judgeGetCardDetailFetchStatus 를 중복해서 쓰던데 요부분만 봐주세요!

@@ -56,7 +104,7 @@ public class CardAPI {
}

switch statusCode {
case 201:
case 200:
Copy link
Member

Choose a reason for hiding this comment

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

여기 201 을 집어넣은건요! 명함생성에서 성공이 201 번이라서 넣은건데..
생각해보니 이러면 제가 만든 getCardDetailFetch 에서도 못쓰네여.. 요건 어차피 judgeStatus 함수를 추가로 만들어야하기 때문에 추후에 또 수정하는걸로 해요!

Comment on lines 50 to 64
func getCardListFetch(userID: String, isList: Bool, offset: Int, completion: @escaping (NetworkResult<Any>) -> Void) {
cardProvider.request(.cardListFetch(userID: userID, isList: isList, offset: offset)) { (result) in
switch result {
case .success(let response):
let statusCode = response.statusCode
let data = response.data

let networkResult = self.judgeGetCardDetailFetchStatus(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.

judgeGetCardDetailFetchStatus 에서 Card 데이터형식으로 디코딩을 할 텐데 그래서 디코딩이 안됐을텐데 혹시 서버통신해서 출력되는 것도 확인해보셨나요?!

Copy link
Member Author

Choose a reason for hiding this comment

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

아 그럼 이 judgeStatus를 따로 만들어주는거겠군요
놓쳤습니다

Copy link
Member

@hyun99999 hyun99999 Nov 13, 2021

Choose a reason for hiding this comment

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

self.judgeGetCardDetailFetchStatus 여기에서는 data 를 card 데이터형식으로 받기 때문에 아마 민재가 사용하는 함수에서는 카드 배열이 필요했을거 같아요
그래서 judgeStatus 는 각 통신함수마다 한개씩 존재하는게 사실 맞답니다!
200번이 성공이기도 201 번이 성공이기도하고 디코딩하는 데이터 형식도 다르니깐요!
그러면 출력까지 할 수 있을까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

넵넵~~!~!

Copy link
Member

Choose a reason for hiding this comment

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

좋습니당! 쵝오! 수고했어요 민재 바쁜 와중에 ㅜㅜ 감사합니다~

Comment on lines +115 to +116
case .cardDelete:
return .requestPlain
Copy link
Member

Choose a reason for hiding this comment

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

오호! 이미 했었군요! 잘하셨어요!! 믓찌다

@mini-min mini-min merged commit e989b90 into TeamNADA:develop Nov 13, 2021
@mini-min mini-min deleted the feature/#54 branch November 13, 2021 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 Minjae 🐻‍❄️ 민재 강남1타강사 작업 P1 / Priority High 우선순위 높음
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 로그인, 메인, 리스트 서버통신
2 participants