Skip to content

Commit ed61134

Browse files
committed
[Chore] #193 - toDomain() 메소드 네이밍들 수정
1 parent 4e95e61 commit ed61134

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

CERTI-iOS/Data/Network/Auth/DTO/Request/SignupRequestDTO.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ struct SignupRequestDTO: Codable {
1313
let nickname: String
1414
let jobs: [String]
1515

16-
func toDomain() -> SignupRequestEntity {
16+
func toSignupRequestEntity() -> SignupRequestEntity {
1717
return SignupRequestEntity(
18-
userInformation: userInformation.toDomain(),
18+
userInformation: userInformation.toUserInformationEntity(),
1919
university: university,
2020
grade: grade,
2121
track: track,

CERTI-iOS/Data/Network/Auth/DTO/Response/LoginResponseDTO.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ struct LoginResponseData: Codable {
1818
case needSignUp, preSignupToken, userInformation
1919
}
2020

21-
func toDomain() -> LoginResponseEntity {
21+
func toLoginResponseEntity() -> LoginResponseEntity {
2222
return LoginResponseEntity(
2323
needSignUp: needSignUp,
2424
preSignupToken: preSignupToken,
25-
userInformation: userInformation.toDomain()
25+
userInformation: userInformation.toUserInformationEntity()
2626
)
2727
}
2828
}
2929

3030
struct TokenResponseData: Codable {
3131
let accessToken, refreshToken: String
3232

33-
func toDomain() -> TokenResponseEntity {
33+
func toTokenResponseEntity() -> TokenResponseEntity {
3434
return TokenResponseEntity(accessToken: accessToken, refreshToken: refreshToken)
3535
}
3636
}

CERTI-iOS/Data/Network/Auth/DTO/Response/SignupResponseDTO.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ struct SignupResponseData: Codable {
2020
case nickName, university, trackType, major, jobs, jwtResponse
2121
}
2222

23-
func toDomain() -> SignupResponseEntity {
23+
func toSignupResponseEntity() -> SignupResponseEntity {
2424
return SignupResponseEntity(
2525
userID: userID,
2626
nickName: nickName,
2727
university: university,
2828
trackType: trackType,
2929
major: major,
3030
jobs: jobs,
31-
jwtResponse: jwtResponse.toDomain()
31+
jwtResponse: jwtResponse.toJwtResponseEntity()
3232
)
3333
}
3434
}
3535

3636
struct JwtResponseData: Codable {
3737
let accessToken, refreshToken: String
3838

39-
func toDomain() -> JwtResponseEntity {
39+
func toJwtResponseEntity() -> JwtResponseEntity {
4040
return JwtResponseEntity(accessToken: accessToken, refreshToken: refreshToken)
4141
}
4242
}

CERTI-iOS/Data/Network/Auth/DTO/UserInformationData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct UserInformationData: Codable {
1818
case profileImageURL = "profileImageUrl"
1919
}
2020

21-
func toDomain() -> UserInformationEntity {
21+
func toUserInformationEntity() -> UserInformationEntity {
2222
return UserInformationEntity(
2323
socialID: socialID,
2424
socialType: socialType,

CERTI-iOS/Data/Repositories/DefaultAuthRepository.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class DefaultAuthRepository: AuthRepository {
2727
switch result {
2828
case .success(let response):
2929
guard let data = response.data else { return .failure(.decodingError) }
30-
return .success(data.toDomain())
30+
return .success(data.toLoginResponseEntity())
3131
case .failure(let error):
3232
return .failure(error)
3333
}
@@ -55,7 +55,7 @@ final class DefaultAuthRepository: AuthRepository {
5555
switch result {
5656
case .success(let response):
5757
guard let data = response.data else { return .failure(.decodingError) }
58-
return .success(data.toDomain())
58+
return .success(data.toSignupResponseEntity())
5959
case .failure(let error):
6060
return .failure(error)
6161
}

0 commit comments

Comments
 (0)