Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Mar 10, 2023
1 parent a25261b commit 26b69e3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ParseSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1644,10 +1644,10 @@
91F346C2269B88F7005727B6 /* ParseCloudViewModelTests.swift */,
705025982842FD3B008D6624 /* ParseCLPTests.swift */,
917BA4312703E36800F8D747 /* ParseConfigAsyncTests.swift */,
7030E09429BBC5740021970D /* ParseConfigCodableCombineTests.swift */,
7030E08229BBAF250021970D /* ParseConfigCodableTests.swift */,
7044C21F25C5E0160011F6E7 /* ParseConfigCombineTests.swift */,
70D1BE0625BB2BF400A42E7C /* ParseConfigTests.swift */,
7030E08229BBAF250021970D /* ParseConfigCodableTests.swift */,
7030E09429BBC5740021970D /* ParseConfigCodableCombineTests.swift */,
91B40650267A66ED00B129CD /* ParseErrorTests.swift */,
89899DB426045DC4002E2043 /* ParseFacebookCombineTests.swift */,
89899CF32603CE9D002E2043 /* ParseFacebookTests.swift */,
Expand Down
1 change: 1 addition & 0 deletions Sources/ParseSwift/Types/ParseACL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ extension ParseACL {
try? await KeychainStore.shared.delete(valueFor: ParseStorage.Keys.defaultACL)
#endif
}

}

// Encoding and decoding
Expand Down
1 change: 1 addition & 0 deletions Sources/ParseSwift/Types/ParseConfigCodable+async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ public extension ParseConfigCodable {
completion: continuation.resume)
}
}

}
2 changes: 0 additions & 2 deletions Sources/ParseSwift/Types/ParseConfigCodable+combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public extension ParseConfigCodable {
desires a different policy, it should be inserted in `options`.
*/
static func fetchPublisher(options: API.Options = []) -> Future<[String: V], ParseError> {

Future { promise in
Self.fetch(options: options,
completion: promise)
Expand All @@ -37,7 +36,6 @@ public extension ParseConfigCodable {
*/
static func savePublisher(_ config: [String: V],
options: API.Options = []) -> Future<Bool, ParseError> {

Future { promise in
Self.save(config,
options: options,
Expand Down
6 changes: 2 additions & 4 deletions Sources/ParseSwift/Types/ParseConfigCodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ extension ParseConfigCodable {
public static func fetch(options: API.Options = [],
callbackQueue: DispatchQueue = .main,
completion: @escaping (Result<[String: V], ParseError>) -> Void) {

Task {
var options = options
options.insert(.cachePolicy(.reloadIgnoringLocalCacheData))
Expand All @@ -44,7 +43,6 @@ extension ParseConfigCodable {
}

internal static func fetchCommand() async -> API.NonParseBodyCommand<[String: V], [String: V]> {

return API.NonParseBodyCommand(method: .GET,
path: .config) { (data) -> [String: V] in
let fetched = try ParseCoding
Expand All @@ -54,6 +52,7 @@ extension ParseConfigCodable {
return fetched
}
}

}

// MARK: Update
Expand All @@ -73,7 +72,6 @@ extension ParseConfigCodable {
options: API.Options = [],
callbackQueue: DispatchQueue = .main,
completion: @escaping (Result<Bool, ParseError>) -> Void) {

Task {
var options = options
options.insert(.usePrimaryKey)
Expand All @@ -87,7 +85,6 @@ extension ParseConfigCodable {

// swiftlint:disable:next line_length
internal static func updateCommand(_ config: [String: V]) async -> API.NonParseBodyCommand<ConfigCodableUpdateBody<[String: V]>, Bool> {

let body = ConfigCodableUpdateBody(params: config)
return API.NonParseBodyCommand(method: .PUT, // MARK: Should be switched to ".PATCH" when server supports PATCH.
path: .config,
Expand All @@ -100,6 +97,7 @@ extension ParseConfigCodable {
return updated
}
}

}

// MARK: Current
Expand Down

0 comments on commit 26b69e3

Please sign in to comment.