File tree 3 files changed +9
-6
lines changed
3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change
1
+ import Foundation
2
+
3
+ enum Constants {
4
+ static let defaultHeaders = [
5
+ " X-Client-Info " : " postgrest-swift/ \( version) "
6
+ ]
7
+ }
Original file line number Diff line number Diff line change 1
1
import Foundation
2
2
3
- let version = " 0.0.4 "
4
- let defaultHeaders = [
5
- " X-Client-Info " : " postgrest-swift/ \( version) "
6
- ]
7
-
8
3
/// This is the main class in this package. Use it to execute queries on a PostgREST instance on Supabase.
9
4
public class PostgrestClient {
10
5
/// Configuration for the client
@@ -24,7 +19,7 @@ public class PostgrestClient {
24
19
delegate: PostgrestClientDelegate ? = nil
25
20
) {
26
21
self . url = url
27
- self . headers = headers. merging ( defaultHeaders) { old, _ in old }
22
+ self . headers = headers. merging ( Constants . defaultHeaders) { old, _ in old }
28
23
self . schema = schema
29
24
self . delegate = delegate ?? DefaultPostgrestClientDelegate ( )
30
25
}
Original file line number Diff line number Diff line change
1
+ let version = " 0.0.5 "
You can’t perform that action at this time.
0 commit comments