Skip to content

Commit

Permalink
Add Sendable conformance to DTOs
Browse files Browse the repository at this point in the history
- Updated DeveloperDTO, SearchResponseDTO, and SearchResult to conform to Sendable for better concurrency support.
- Changed import from StickerFoundation to Foundation in the response model.
  • Loading branch information
nicolasvergoz committed Nov 27, 2024
1 parent a929760 commit 581c691
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/Models/DeveloperDTO.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public struct DeveloperDTO: Codable {
public struct DeveloperDTO: Codable, Sendable {
public let wrapperType: SearchResultTypeDTO
public let artistId: Int
public let artistName: String
Expand Down
6 changes: 3 additions & 3 deletions Sources/Models/SearchResponseDTO.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import StickerFoundation
import Foundation

public struct SearchResponseDTO: Decodable {
public struct SearchResponseDTO: Decodable, Sendable {
public let resultCount: Int
public let results: [SearchResult]

Expand All @@ -9,7 +9,7 @@ public struct SearchResponseDTO: Decodable {
}
}

public enum SearchResult: Decodable {
public enum SearchResult: Decodable, Sendable {
case application(ApplicationDTO)
case developer(DeveloperDTO)

Expand Down

0 comments on commit 581c691

Please sign in to comment.