Skip to content

Commit

Permalink
Merge branch 'develop' into cicd-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
HyunSu1768 committed Mar 27, 2024
2 parents 2e8c4b9 + 78ef492 commit 200707b
Show file tree
Hide file tree
Showing 32 changed files with 998 additions and 734 deletions.
1 change: 1 addition & 0 deletions Projects/Core/Sources/Base/BaseViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ open class BaseViewController<T>: UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
bindViewModel()
bindActions()
layout()
setupKeyboardHandling()
attribute()
Expand Down
36 changes: 25 additions & 11 deletions Projects/Data/Sources/Repository/AuthRepository.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import MGNetworks

import RxSwift
import RxCocoa
Expand All @@ -7,32 +8,45 @@ import Moya
import RxMoya

import Domain
import MGNetworks
import KakaoSDKAuth

public class AuthRepository: AuthRepositoryInterface {

private let networkService: AuthService

public init(networkService: AuthService) {
self.networkService = networkService
public func oauthSignup(nickname: String, accessToken: String, oauth: OauthType) -> Single<Response> {
return networkService.oauthSingup(nickname: nickname, accessToken: accessToken, oauth: oauth)
}

public func kakaoToken() -> Single<Bool> {
networkService.kakaoTokenState()
public func oauthLogin(accessToken: String, oauth: OauthType) -> Single<Response> {
return networkService.oauthLogin(accessToken: accessToken, oauth: oauth)
}

public func getCSRFToken() -> Single<String> {
return networkService.getCSRFToken()
public func oauthRecovery(accessToken: String, oauth: OauthType) -> Single<Response> {
return networkService.oauthRecovery(accessToken: accessToken, oauth: oauth)
}

public func nicknameCheck(nickname: String) -> Single<Response> {
return networkService.nicknameCheck(nickname: nickname)
}

public func getIntroData() -> Single<IntroModel> {
return networkService.requestIntroData()
}

public func appleSignup() -> RxSwift.Single<String> {
return networkService.appleSignup()
public func appleButtonTap() -> Single<String> {
return networkService.appleButtonTap()
}

public func kakaoButtonTap() -> Single<OAuthToken?> {
return networkService.kakaoButtonTap()
}

public func appleSingup(nickname: String, accessToken: String) -> Single<String> {
return networkService.appleSignup(nickname: nickname, accessToken: accessToken)
public init(networkService: AuthService) {
self.networkService = networkService
}

// public func appleSingup(nickname: String, accessToken: String) -> Single<String> {
// return networkService.appleSignup(nickname: nickname, accessToken: accessToken)
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@ import UIKit

import RxSwift
import RxCocoa
import Moya

import KakaoSDKAuth

public enum OauthType {
case google
case kakao
case apple
}

public protocol AuthRepositoryInterface {
func kakaoToken() -> Single<Bool>
func getCSRFToken() -> Single<String>
func kakaoButtonTap() -> Single<OAuthToken?>
func appleButtonTap() -> Single<String>
func oauthSignup(nickname: String, accessToken: String, oauth: OauthType) -> Single<Response>
func oauthLogin(accessToken: String, oauth: OauthType) -> Single<Response>
func oauthRecovery(accessToken: String, oauth: OauthType) -> Single<Response>
func nicknameCheck(nickname: String) -> Single<Response>
func getIntroData() -> Single<IntroModel>
func appleSignup() -> Single<String>
func appleSingup(nickname: String, accessToken: String) -> Single<String>
}
20 changes: 20 additions & 0 deletions Projects/Domain/Sources/Response/LoginDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Foundation

public struct LoginResponseDTO: Decodable {
public let status: Int
public let accessToken: String
public let refreshToken: String
}

public struct SignupResponseDTO: Decodable {
public let status: Int
}

public struct RecoveryResponseDTO: Decodable {
public let status: Int
}

enum AuthErrorType: Error {
case notFound400
case notInt
}
1 change: 0 additions & 1 deletion Projects/Domain/Sources/Response/dummy4.swift

This file was deleted.

Loading

0 comments on commit 200707b

Please sign in to comment.