Skip to content

Commit 5217173

Browse files
committed
[feat] #188 BaseProfileResponse 도메인 매핑 함수 추가
1 parent 70f95d3 commit 5217173

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// BaseProfileImageResponse+Extensions.swift
3+
// Domain
4+
//
5+
// Created by 김민호 on 2/25/25.
6+
//
7+
8+
import Foundation
9+
10+
import CoreKit
11+
12+
public extension BaseProfileImageResponse {
13+
func toDomain() -> BaseProfile {
14+
return .init(id: self.id, imageURL: self.url)
15+
}
16+
}

Projects/Domain/Sources/DTO/User/BaseUserResponse+Extension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public extension BaseUserResponse {
1717
nickname: self.nickname,
1818
profile: self.profileImage == nil
1919
? nil
20-
: BaseProfile(id: self.profileImage?.id ?? 0, url: self.profileImage?.url ?? "")
20+
: BaseProfile(id: self.profileImage?.id ?? 0, imageURL: self.profileImage?.url ?? "")
2121
)
2222
}
2323
}

0 commit comments

Comments
 (0)