-
Notifications
You must be signed in to change notification settings - Fork 5
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
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.
👍😎
struct GroupEditRequest: Codable { | ||
var groupId: Int? | ||
var groupName: String? | ||
} |
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.
request 용을 사용하는 부분이라서 혹시 굳이 옵셔널일 이유가 있을까요..?! 흠흠 이걸보니 어디서부터 어디까지를 request 할 때 모델을 만들건지도 얘기해봐야겠네요
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.
넵 그러면 요거는 지워주세욥
struct Group: Codable { | ||
var groupId: Int? | ||
var groupName: String? | ||
} |
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.
이거보니까 저도 response 데이터 모델에는 옵셔널 설정을 해줘야겠군요..!
앱이 죽는걸 방지하는 목적이죠?
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 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) | ||
} | ||
} | ||
} |
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.
judgeStatus
함수에서 Groups 으로 디코딩하는데 혹시 통신되는지 확인하셨나요?
위에 getGroupListFetch
에서는 되는 디코딩일텐데 getCardListFetch
여기서는 다른 judgeStatus 메서드를 만드셔야할거 같아요..!
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.
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.
이상허다 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
아 고것은 위에 결과는 모야플러그인으로 제가 만든 인터페이스에서 서버에서 가져온 결과를 뿌려준거에영
혹시 ----END HTTP--- 이거 위에 있지 않았나여?
groups 로 judgeStatus 가 디코딩을 하니까 저 그룹아이디 뭐 이렇게 구성된 데이터모델인데 저게 출력될리는 없을거에용 아마도 아무것도 print 가 안될거야 디코딩이 안되서
한번 다시해서 출력해볼래요? 그러면 위에 인터페이스말고도 출력이 될겁니당
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.
굳굳 멋집니다!!
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.
고생하셨습니다✨
저도 빨리 선생님 따라가겠습니다.
case .requestErr(let message): | ||
print("postCardAddInGroupWithAPI - requestErr", message) | ||
case .pathErr: | ||
print("postCardAddInGroupWithAPI - pathErr") | ||
case .serverErr: | ||
print("postCardAddInGroupWithAPI - serverErr") | ||
case .networkFail: | ||
print("postCardAddInGroupWithAPI - networkFail") |
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.
print 찍혀 나오는거 getCardListWithAPI로 바꿔주시면 감사하겠습니당 ^___^
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.
어머어머 매의 눈 최고
🌴 PR 요약
🌱 작업한 브랜치
🌱 작업한 내용
📮 관련 이슈