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] #56 - 명함 그룹 뷰 서버통신 #60

Merged
merged 10 commits into from
Nov 16, 2021

Conversation

dlwns33
Copy link
Member

@dlwns33 dlwns33 commented Nov 12, 2021

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

  • 그룹 리스트 조회 서버통신
  • 그룹 속 명함 조회 서버통신
  • 그룹 삭제 서버통신
  • 그룹명 수정 서버통신
  • 그룹명 추가 서버통신
  • 명함 검색 서버통신
  • 그룹 속 명함 추가 서버통신

📮 관련 이슈

@dlwns33 dlwns33 added Yijoon 🐨 이준 대치동강사 작업 Feat 새로운 기능 구현 labels Nov 12, 2021
@dlwns33 dlwns33 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.

👍😎

Comment on lines +10 to +13
struct GroupEditRequest: Codable {
var groupId: Int?
var groupName: String?
}
Copy link
Member

Choose a reason for hiding this comment

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

request 용을 사용하는 부분이라서 혹시 굳이 옵셔널일 이유가 있을까요..?! 흠흠 이걸보니 어디서부터 어디까지를 request 할 때 모델을 만들건지도 얘기해봐야겠네요

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 +14 to +17
struct Group: Codable {
var groupId: Int?
var groupName: String?
}
Copy link
Member

Choose a reason for hiding this comment

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

이거보니까 저도 response 데이터 모델에는 옵셔널 설정을 해줘야겠군요..!
앱이 죽는걸 방지하는 목적이죠?

Copy link
Member Author

Choose a reason for hiding this comment

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

넴 맞습니다 !!!!

Comment on lines 130 to 144
func getCardListFetch(cardListRequest: CardListRequest, completion: @escaping (NetworkResult<Any>) -> Void) {
groupProvider.request(.cardListFetch(cardListRequest: cardListRequest)) { (result) in
switch result {
case .success(let response):
let statusCode = response.statusCode
let data = response.data

let networkResult = self.judgeStatus(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 함수에서 Groups 으로 디코딩하는데 혹시 통신되는지 확인하셨나요?
위에 getGroupListFetch 에서는 되는 디코딩일텐데 getCardListFetch 여기서는 다른 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.

어라라 서버 통신 되는거 확인했었는데 ... 제가 한번 다시 확인해보겠슴다!

Copy link
Member Author

Choose a reason for hiding this comment

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

이상허다... 이거 왜.. 되져?
image

Copy link
Member

Choose a reason for hiding this comment

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

이상허다 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
아 고것은 위에 결과는 모야플러그인으로 제가 만든 인터페이스에서 서버에서 가져온 결과를 뿌려준거에영
혹시 ----END HTTP--- 이거 위에 있지 않았나여?
groups 로 judgeStatus 가 디코딩을 하니까 저 그룹아이디 뭐 이렇게 구성된 데이터모델인데 저게 출력될리는 없을거에용 아마도 아무것도 print 가 안될거야 디코딩이 안되서
한번 다시해서 출력해볼래요? 그러면 위에 인터페이스말고도 출력이 될겁니당

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 이름 안겹치게 새로 만들어서 출력되는거 확인했습니당 !!
image

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

@mini-min mini-min left a comment

Choose a reason for hiding this comment

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

고생하셨습니다✨
저도 빨리 선생님 따라가겠습니다.

Comment on lines +145 to +152
case .requestErr(let message):
print("postCardAddInGroupWithAPI - requestErr", message)
case .pathErr:
print("postCardAddInGroupWithAPI - pathErr")
case .serverErr:
print("postCardAddInGroupWithAPI - serverErr")
case .networkFail:
print("postCardAddInGroupWithAPI - networkFail")
Copy link
Member

Choose a reason for hiding this comment

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

print 찍혀 나오는거 getCardListWithAPI로 바꿔주시면 감사하겠습니당 ^___^

Copy link
Member Author

Choose a reason for hiding this comment

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

어머어머 매의 눈 최고

@dlwns33 dlwns33 merged commit b58ef85 into TeamNADA:develop Nov 16, 2021
@dlwns33 dlwns33 deleted the feature/#56 branch November 21, 2021 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 Yijoon 🐨 이준 대치동강사 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 명함 그룹 뷰 서버통신
3 participants