-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
246 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// FindPWRepository.swift | ||
// FitHub | ||
// | ||
// Created by 신상우 on 2023/07/23. | ||
// | ||
|
||
import Foundation | ||
import RxSwift | ||
|
||
protocol FindPWRepositoryInterface { | ||
func checkUserInfo(_ phoneNum: String) -> Single<Int> | ||
} | ||
|
||
final class FindPWRepository: FindPWRepositoryInterface { | ||
private let service: AuthService | ||
|
||
init(_ service: AuthService) { | ||
self.service = service | ||
} | ||
|
||
func checkUserInfo(_ phoneNum: String) -> Single<Int> { | ||
return service.checkUserInfo(phoneNum) | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
FitHub/Data/Repository/Auth/SignIn/OAuthLoginRepository.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// OAuthLoginRepository.swift | ||
// FitHub | ||
// | ||
// Created by 신상우 on 2023/07/23. | ||
// | ||
|
||
import Foundation | ||
import RxSwift | ||
|
||
protocol OAuthLoginRepositoryInterface { | ||
func signInWithApple(_ token: String) -> Single<OAuthLoginDTO> | ||
func signInWithKakao(_ socialId: String) -> Single<OAuthLoginDTO> | ||
} | ||
|
||
final class OAuthLoginRepository: OAuthLoginRepositoryInterface { | ||
private let service: AuthService | ||
|
||
init(_ service: AuthService) { | ||
self.service = service | ||
} | ||
|
||
func signInWithApple(_ token: String) -> Single<OAuthLoginDTO> { | ||
return service.signInAppleLogin(token) | ||
} | ||
|
||
func signInWithKakao(_ socialId: String) -> Single<OAuthLoginDTO> { | ||
return service.signInKakaoLogin(socialId) | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
FitHub/Data/Repository/Auth/SignIn/PhoneNumLoginRepository.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// PhoneNumLoginRepository.swift | ||
// FitHub | ||
// | ||
// Created by 신상우 on 2023/07/23. | ||
// | ||
|
||
import Foundation | ||
import RxSwift | ||
|
||
protocol PhoneNumLoginRepositoryInterface { | ||
func signInWithPhoneNumber(_ phoneNum: String,_ password: String) -> Single<PhoneNumLoginDTO> | ||
} | ||
|
||
final class PhoneNumLoginRepository: PhoneNumLoginRepositoryInterface { | ||
private let service: AuthService | ||
|
||
init(_ service: AuthService) { | ||
self.service = service | ||
} | ||
|
||
func signInWithPhoneNumber(_ phoneNum: String, _ password: String) -> Single<PhoneNumLoginDTO> { | ||
return service.signInPhoneNumber(phoneNum, password) | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
FitHub/Data/Repository/Auth/SignUp/PhoneVerificationRepository.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// PhoneVerificationRepository.swift | ||
// FitHub | ||
// | ||
// Created by 신상우 on 2023/07/23. | ||
// | ||
|
||
import Foundation | ||
import RxSwift | ||
|
||
protocol PhoneVerificationRepositoryInterface { | ||
func sendAuthenticationNumber(_ phoneNum: String) -> Single<Int> | ||
func verifyAuthenticationNumber(_ phoneNum: String, _ authNum: Int) -> Single<Int> | ||
} | ||
|
||
final class PhoneVerificationRepository: PhoneVerificationRepositoryInterface { | ||
private let service: AuthService | ||
|
||
init(_ service: AuthService) { | ||
self.service = service | ||
} | ||
|
||
func sendAuthenticationNumber(_ phoneNum: String) -> Single<Int> { | ||
return service.sendAuthenticationNumber(phoneNum) | ||
} | ||
|
||
func verifyAuthenticationNumber(_ phoneNum: String, _ authNum: Int) -> Single<Int> { | ||
return service.verifyAuthenticationNumber(phoneNum, authNum) | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
FitHub/Data/Repository/Auth/SignUp/ProfileRepository.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// ProfileRepository.swift | ||
// FitHub | ||
// | ||
// Created by 신상우 on 2023/07/23. | ||
// | ||
|
||
import Foundation | ||
import RxSwift | ||
|
||
protocol ProfileRepositoryInterface { | ||
func duplicationNickNameCheck(_ nickName: String) -> Single<UserInfoStatus> | ||
} | ||
|
||
final class ProfileRepository: ProfileRepositoryInterface { | ||
private let service: AuthService | ||
|
||
init(_ service: AuthService) { | ||
self.service = service | ||
} | ||
|
||
func duplicationNickNameCheck(_ nickName: String) -> Single<UserInfoStatus> { | ||
return self.service.duplicationNickNameCheck(nickName) | ||
.map { $0 ? .duplicateNickName : .nickNameSuccess } | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
FitHub/Data/Repository/Auth/SignUp/RegistInfoRepository.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// RegistInfoRepository.swift | ||
// FitHub | ||
// | ||
// Created by 신상우 on 2023/07/23. | ||
// | ||
|
||
import Foundation | ||
import RxSwift | ||
|
||
//MARK: api 아직 안나옴 | ||
protocol RegistInfoRepositoryInterface { | ||
|
||
} | ||
|
||
final class RegistInfoRepository: RegistInfoRepositoryInterface { | ||
private let service: AuthService | ||
|
||
init(_ service: AuthService) { | ||
self.service = service | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.