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] 토큰 재발급 API 연결 (#31) #33

Merged
merged 8 commits into from
Feb 16, 2025
Merged

[FEAT] 토큰 재발급 API 연결 (#31) #33

merged 8 commits into from
Feb 16, 2025

Conversation

cirtuare
Copy link
Contributor

@cirtuare cirtuare commented Feb 15, 2025

🐿️ Pull Requests

🪵 작업 브랜치

🥔 작업 내용

토큰 리이슈 API를 연결하고, 모든 서버통신 분기처리에 적용해두었습니다.

🚨 참고 사항

아직 테스트를 못 해봐서, 서버 측에 엑세스 토큰 만료 시간 1분으로 조정해달라 하고 테스트해볼게요 !

테스트 완료했습니다 !

적용 방법

  1. 서버통신 메소드를 호출하는 뷰모델은 Servicable 프로토콜을 상속
  2. 서버통신 메소드 분기처리를 기존 .success과 .default 중간에 .reIssueJWT를 추가해주세요 !
case .success(let data):
     self?.localArea.value = data.area
     self?.onSuccessPostLocalArea.value = true
 case .reIssueJWT:
     self?.handleReissue { [weak self] in
         self?.postLocalArea()
     }
 default:
     print("Failed To Post")
     self?.onSuccessPostLocalArea.value = false

completion Handler 안에는 reIssue 완료 시 다시 실행할 서버통신 함수를 넣어주세용 ~

📸 스크린샷

💥 To be sure

  • 모든 뷰가 잘 실행되는지 다시 한 번 체크해주세요 !

🌰 Resolve issue

@cirtuare cirtuare added ⚪️ network 네트워크 연결 🍓 수민 수민 labels Feb 15, 2025
@cirtuare cirtuare requested a review from yurim830 February 15, 2025 21:36
@cirtuare cirtuare self-assigned this Feb 15, 2025
@cirtuare cirtuare requested a review from Ohjackson February 16, 2025 08:13
Copy link
Collaborator

@yurim830 yurim830 left a comment

Choose a reason for hiding this comment

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

멋쟁잉! 고생했어~~~

@cirtuare cirtuare merged commit 61b4e55 into develop Feb 16, 2025
@cirtuare cirtuare added this to the Sprint-2 milestone Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚪️ network 네트워크 연결 🍓 수민 수민
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 엑세스 토큰 재발급 API 연결
2 participants