-
Notifications
You must be signed in to change notification settings - Fork 8
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
๐ :: (#553) Playlist ๋๋ฉ์ธ์ v3๋ก ์ ๋ฐ์ดํธํฉ๋๋ค. #559
Conversation
โ Successful finished SwiftLint |
} | ||
} | ||
|
||
var loadPlayListUseCase: any LoadPlayListUseCase { | ||
var updateTitleAndPrivateeUseCase: any UpdateTitleAndPrivateeUseCase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateTitleAndPrivateeUseCase
Private"e" ๋ค์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์์ ํ์ต๋๋ค.
import Foundation | ||
|
||
public enum UploadImageType { | ||
case `default`(data: String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data๋ณด๋ค๋ imageName ์ด๋ฐ์ ์ด๋ค๊ฐ์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฐ์ํ๊ฒ ์ต๋๋ค ~
|
||
public enum UploadImageType { | ||
case `default`(data: String) | ||
case custom (data: Data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ์ผ์ด๋ฆ๊ฐ์๊ฑฐ๋ ๋ฐ๋๊ฑฐ ์ด๋ค๊ฐ์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ์ผ์ด๋ฆ์ด์ ?? ์๋ฒ์ ๋ณด๋ผ ๋ ์ฐ์ง ์๋๋ฐ ๋ฐ์ ํ์๊ฐ ์๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ์ผ ์ด๋ฆ ์๋ณด๋ด๋ฉด ์๋ฒ์์ 500๋์์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ๋ ์์ํฌ๋จ์์ ํฐ์ ธ์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ ์ด๋ค์์ผ๋ก ํํ ์ข์๊น์ ??
default๋ ์ ํฌ๊ฐ ์ ๊ณตํด์ฃผ๋ ๊ธฐ๋ณธ ์ด๋ฏธ์ง๋ค์ด๊ณ
custom์ด ๊ฐค๋ฌ๋ฆฌ์์ ๊ฐ์ ธ์ค๋ ๊ฒ๋ค์ธ๋ฐ
import RxSwift | ||
|
||
public protocol UploadPlaylistImageUseCase { | ||
func execute(key: String, model: UploadImageType) -> Single<BaseImageEntity> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ทธ๋ฅ String ๋ฆฌํดํ๋๊ฑฐ ์ด๋ค๊ฐ์? ๊ฐ์ํ์๊ฐ ์์๊น ๋ผ๋ ์๊ฐ์ด ๋๋ค์.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ ๋ ํต์ผ์ฑ ๋๋ฌธ์ ์ฐ๊ธดํ๋๋ฐ.. ๊ทธ๊ฒ ๋์๊น์ ??
case fetchPlaylistSongs(key: String) // ์ ์ฒด ์ฌ์ ์ ๊ณก ๋ฐ์ดํฐ๋ง ๊ฐ์ ธ์ค๊ธฐ | ||
case addSongIntoPlayList(key: String, songs: [String]) // ๊ณก ์ถ๊ฐ | ||
case updatePlaylist(key: String, songs: [String]) // ์ต์ข ์ ์ฅ | ||
case removeSongs(key: String, songs: String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
songs๋ [String]์ผ๋ก ๋ฐ๊ณ task ์ ์ํ ๋ .join(",") ํ๋๊ฑฐ ์ด๋ค๊ฐ์, ์์๋นํด ์ผ๊ด์ฑ์ด ์ฝ๊ฐ ๋จ์ด์ ธ๋ณด์ฌ์์
ํ ์ ๋งคํ๊ธดํ๋ค์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฒ๋ฆฌํ์ต๋๋ค.
datas.append(MultipartFormData(provider: .data("default".data(using: .utf8)!), name: "type")) | ||
datas.append(MultipartFormData(provider: .data(data.data(using: .utf8)!), name: "imageName")) | ||
|
||
case let .custom(data: data): | ||
datas.append(MultipartFormData(provider: .data("custom".data(using: .utf8)!), name: "type")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
! ๋ค์ด ์ข ๋ง์ด ๋ถํธํ๊ธดํ๋ค์, ํ์ ์ ์ด๋ผํด๋. ์ฝ๋์์ด !๊ฐ ์ฌ๋ฟ ์๋ค๋๊ฑฐ๋งํด๋ !๋ฅผ ์ฐ๋๊ฒ ๋น์ฐ์๋๋ ๊ทธ๋ฐ ํจ๊ณผ๊ฐ ์๊ธธ๊ฑฐ๊ฐ์์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ .. ๊ทธ๋ฌ๋ฉด ?? ์ฐ์ฐ์๋ฅผ ์ธ๊น์?
public let key: String? | ||
public let title: String | ||
public let songs: [SingleSongResponseDTO]? | ||
public let image: SinglePlayListDetailResponseDTO.Image | ||
} | ||
|
||
public extension SinglePlayListDetailResponseDTO { | ||
struct Image: Decodable { | ||
public let round: Int? | ||
public let square: Int? | ||
public let name: String? | ||
public let version: Int? | ||
} | ||
public let imageUrl: String? | ||
public let `private`: Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key๋ imageUrl์ด ์ต์ ๋์ธ ์ด์ ๊ฐ ์์๊น์?
@@ -27,7 +27,7 @@ public final class PlayListDetailComponent: Component<PlayListDetailDependency>, | |||
key: id, | |||
type: isCustom ? .custom : .wmRecommend, | |||
fetchPlayListDetailUseCase: dependency.fetchPlayListDetailUseCase, | |||
editPlayListUseCase: dependency.editPlayListUseCase, | |||
updatePlaylistUseCase: dependency.updatePlaylistUseCase, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ .. ๋น์ฅ ๋ฐ์๋์ด์ผํ๋ค๋๊ฑด ์๋๋ฐ ์ด๋๋ Play"L"ist ์ด๋๋ Play"l"ist ์ข ์ฌ๋ฌ์์ผ๋ก ํผ์ฉ๋๊ณ ์๋๊ฑฐ๊ฐ๋ค์, ํ๋ฒ ์ ํ๋ ์๊ฐ์ด ์๋๊ฒ ์ข์๊ฑฐ๊ฐ์์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ .. ๊ทธ๋ฌ๋ค์ ์ ์ ๋ง์๋๋ฆฐ ์์ ์ ๋ฆฌํ ๋ ํ๋ฒ ํด์ผ๊ฒ ๋ค์ ..
โฆsic/wakmusic-iOS into 553-update-playlist-domain
let .removeSongs( | ||
key: key, | ||
_ | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด ์น๊ตฌ ๋ญ ๋ณ์์ธ์ค ์์๋๋ฐ case๋ณ๋ก ์ค๋ฐ๊ฟ ํ๊ฑฐ๋ค์? ๊ฐ๋ ์ฑ์ ์ ํดํ๋๊ฑฐ๊ฐ์์ ์ด์น๊ตฌ๋ ๊ทธ๋ฅ ํ ๋ผ์ธ์ ๋๋๊ฒ ์ข์๊ฑฐ๊ฐ์์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ค์ ์ด๊ฑฐ ์ ๊ฐ ์ํ์ด์ ใ ใ ใ ํฌ๋งทํ ์ด ๋ฒ์ธ์ ๋๋ค !
provider: .data(data), | ||
name: "imageFile", | ||
fileName: "image.jpeg", | ||
mimeType: "image/jpeg, image/jpg, image/png" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mimeType ์ด๊ฑฐ,, ์ด๋ ๊ฒ ํด๋,, ๋๋์..? mimeType์ optional์ด๋ผ ์๋ณด๋ด๋ ๋ฌธ์ ๊ฐ ์์๋๋ฐ ํ์์ nest์์ ์ด๋ป๊ฒ ์ฒ๋ฆฌ๋๋์ง๋ ๋ชจ๋ฅด๊ฒ ๋ค์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ ๊ทธ๋ฌ๋ฉด ์ผ๋จ ๋นผ๋ณผ๊ป์ ๊ฒ์์์ ์ฐธ๊ณ ํ๋๊ฒ ๋ค ๋ช ์๋ฅผ ํด์ค๊ฐ์ง๊ณ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ณด๋ผ๊ฑฐ๋ฉด 1๊ฐ๋ง,, ์ ๋ฐ ์คํธ๋ง ์ ํธ๋ฅผ ๋ณด๋ธ์ ์ด ์์ด์ ๋ชจ๋ฅด๊ฒ ๋ค์.
datas.append(MultipartFormData( | ||
provider: .data("default".data(using: .utf8)!), | ||
name: "type", | ||
fileName: "ใ " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฌ๊ธฐ๋ ๊ทธ๋ฅ ์ง์ฐ์ ๋ ๋ ๊ฑฐ๊ฐ์์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๊ฑฐํ์ต๋๋ค.
} | ||
|
||
public let status: Int | ||
public let added_songs_length: Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ snake_case๋ค์,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฐ์ํ์ต๋๋ค.
๐ก ๋ฐฐ๊ฒฝ ๋ฐ ๊ฐ์
Resolves: #553
๐ ์์ ๋ด์ฉ
๐โโ๏ธ ๋ฆฌ๋ทฐ๋ ธํธ
โ PR ์ฒดํฌ๋ฆฌ์คํธ
XCConfig
,๋ ธ์
,README
)"API ๊ฐ๋ฐ ์๋ฃ๋์ด์"
,"XCConfig ๊ฐ ์ถ๊ฐ๋์์ด์"
)๐ธ ๊ธฐํ