Skip to content

Commit 1e69638

Browse files
committed
Fix intendation
1 parent b5470b4 commit 1e69638

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

ConveyPI/API.swift

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@ import Foundation
1010
import PromiseKit
1111

1212
public protocol API {
13-
13+
1414
var encoder: JSONEncoder { get set }
1515
var decoder: JSONDecoder { get set }
1616

1717
func request<T, U, E>(method: APIMethod,
18-
baseURL: URL,
19-
resource: String,
20-
headers: [String: String]?,
21-
params: [String: Any]?,
22-
body: T?,
23-
error: E.Type,
24-
decorator: ((inout URLRequest) -> Void)?) -> Promise<U> where T: Encodable, U: Decodable, E: (Error & Decodable)
18+
baseURL: URL,
19+
resource: String,
20+
headers: [String: String]?,
21+
params: [String: Any]?,
22+
body: T?,
23+
error: E.Type,
24+
decorator: ((inout URLRequest) -> Void)?) -> Promise<U> where T: Encodable, U: Decodable, E: (Error & Decodable)
2525
}
2626

2727
public extension API {
28-
28+
2929
func request<U, E>(method: APIMethod,
30-
baseURL: URL,
31-
resource: String = "/",
32-
headers: [String: String]? = nil,
33-
params: [String: Any]? = nil,
34-
error: E.Type,
35-
decorator: ((inout URLRequest) -> Void)? = nil) -> Promise<U> where U: Decodable, E: Decodable & Error {
36-
30+
baseURL: URL,
31+
resource: String = "/",
32+
headers: [String: String]? = nil,
33+
params: [String: Any]? = nil,
34+
error: E.Type,
35+
decorator: ((inout URLRequest) -> Void)? = nil) -> Promise<U> where U: Decodable, E: Decodable & Error {
36+
3737
return request(method: method,
3838
baseURL: baseURL,
3939
resource: resource,
@@ -45,13 +45,13 @@ public extension API {
4545
}
4646

4747
func request<T, E>(method: APIMethod,
48-
baseURL: URL,
49-
resource: String = "/",
50-
headers: [String: String]? = nil,
51-
params: [String: Any]? = nil,
52-
body: T?,
53-
error: E.Type,
54-
decorator: ((inout URLRequest) -> Void)? = nil) -> Promise<Void> where T: Encodable, E: Decodable & Error {
48+
baseURL: URL,
49+
resource: String = "/",
50+
headers: [String: String]? = nil,
51+
params: [String: Any]? = nil,
52+
body: T?,
53+
error: E.Type,
54+
decorator: ((inout URLRequest) -> Void)? = nil) -> Promise<Void> where T: Encodable, E: Decodable & Error {
5555
let promise: Promise<EmptyResponse> = request(method: method,
5656
baseURL: baseURL,
5757
resource: resource,

0 commit comments

Comments
 (0)