Skip to content

Commit a25261b

Browse files
committed
nits
1 parent 9b9fea1 commit a25261b

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Sources/ParseSwift/Types/ParseConfigCodable+combine.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public extension ParseConfigCodable {
2222
desires a different policy, it should be inserted in `options`.
2323
*/
2424
static func fetchPublisher(options: API.Options = []) -> Future<[String: V], ParseError> {
25+
2526
Future { promise in
2627
Self.fetch(options: options,
2728
completion: promise)
@@ -36,12 +37,14 @@ public extension ParseConfigCodable {
3637
*/
3738
static func savePublisher(_ config: [String: V],
3839
options: API.Options = []) -> Future<Bool, ParseError> {
40+
3941
Future { promise in
4042
Self.save(config,
4143
options: options,
4244
completion: promise)
4345
}
4446
}
47+
4548
}
4649

4750
#endif

Sources/ParseSwift/Types/ParseConfigCodable.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extension ParseConfigCodable {
3232
public static func fetch(options: API.Options = [],
3333
callbackQueue: DispatchQueue = .main,
3434
completion: @escaping (Result<[String: V], ParseError>) -> Void) {
35+
3536
Task {
3637
var options = options
3738
options.insert(.cachePolicy(.reloadIgnoringLocalCacheData))
@@ -72,6 +73,7 @@ extension ParseConfigCodable {
7273
options: API.Options = [],
7374
callbackQueue: DispatchQueue = .main,
7475
completion: @escaping (Result<Bool, ParseError>) -> Void) {
76+
7577
Task {
7678
var options = options
7779
options.insert(.usePrimaryKey)
@@ -85,6 +87,7 @@ extension ParseConfigCodable {
8587

8688
// swiftlint:disable:next line_length
8789
internal static func updateCommand(_ config: [String: V]) async -> API.NonParseBodyCommand<ConfigCodableUpdateBody<[String: V]>, Bool> {
90+
8891
let body = ConfigCodableUpdateBody(params: config)
8992
return API.NonParseBodyCommand(method: .PUT, // MARK: Should be switched to ".PATCH" when server supports PATCH.
9093
path: .config,
@@ -160,6 +163,7 @@ extension ParseConfigCodable {
160163
currentContainer?.currentConfig = current
161164
await Self.setCurrentContainer(currentContainer)
162165
}
166+
163167
}
164168

165169
struct CurrentConfigDictionaryContainer<T: Codable>: Codable {

Tests/ParseSwiftTests/ParseConfigCodableTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class ParseConfigCodableTests: XCTestCase { // swiftlint:disable:this type_body_
167167
return nil
168168
}
169169
}
170+
170171
try await User.logout()
171172
do {
172173
_ = try await ParseConfigCodable<[String: AnyCodable]>.current()

0 commit comments

Comments
 (0)