- Add BookmarkLabel model and DTO - Create LabelsRepository and PLabelsRepository protocol - Add GetLabelsUseCase for fetching labels - Update BookmarkMapper to handle labels - Add LabelsView and LabelsViewModel for UI - Update BookmarksView and BookmarkLabelsView to display labels - Add green2 color asset for labels - Update API and repository layers to support labels
14 lines
325 B
Swift
14 lines
325 B
Swift
import Foundation
|
|
|
|
class GetLabelsUseCase {
|
|
private let labelsRepository: PLabelsRepository
|
|
|
|
init(labelsRepository: PLabelsRepository) {
|
|
self.labelsRepository = labelsRepository
|
|
}
|
|
|
|
func execute() async throws -> [BookmarkLabel] {
|
|
return try await labelsRepository.getLabels()
|
|
}
|
|
}
|