Skip to content

Commit

Permalink
More Sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jul 11, 2024
1 parent e46737b commit 5d7ebd6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Sources/ParseSwift/Objects/ParseInstallation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,9 @@ extension ParseInstallation {
let acl = try? await ParseACL.defaultACL() {
object.ACL = acl
}
let mapper = { (data) -> Self in
try ParseCoding.jsonDecoder().decode(CreateResponse.self, from: data).apply(to: object)
let updatedObject = object
let mapper = { @Sendable (data) -> Self in
try ParseCoding.jsonDecoder().decode(CreateResponse.self, from: data).apply(to: updatedObject)
}
return API.Command<Self, Self>(method: .POST,
path: try await endpoint(.POST),
Expand All @@ -761,7 +762,7 @@ extension ParseInstallation {
throw ParseError(code: .missingObjectId,
message: "objectId must not be nil")
}
let mapper = { (data: Data) -> Self in
let mapper = { @Sendable (data: Data) -> Self in
var updatedObject = self
updatedObject.originalData = nil
updatedObject = try ParseCoding.jsonDecoder().decode(ReplaceResponse.self,
Expand All @@ -786,7 +787,7 @@ extension ParseInstallation {
throw ParseError(code: .missingObjectId,
message: "objectId must not be nil")
}
let mapper = { (data: Data) -> Self in
let mapper = { @Sendable (data: Data) -> Self in
var updatedObject = self
updatedObject.originalData = nil
updatedObject = try ParseCoding.jsonDecoder().decode(UpdateResponse.self,
Expand Down

0 comments on commit 5d7ebd6

Please sign in to comment.