@@ -46,7 +46,7 @@ public func waitForTask(
46
46
request ( )
47
47
}
48
48
49
- public func createGenericIndex( client: MeiliSearch , uid: String , _ completion: @escaping ( Result < Task , Swift . Error > ) -> Void ) {
49
+ public func createGenericIndex( client: MeiliSearch , uid: String , _ completion: @escaping ( Result < MTask , Swift . Error > ) -> Void ) {
50
50
client. deleteIndex ( uid) { result in
51
51
switch result {
52
52
case . success:
@@ -71,7 +71,7 @@ public func createGenericIndex(client: MeiliSearch, uid: String, _ completion: @
71
71
}
72
72
}
73
73
74
- public func deleteIndex( client: MeiliSearch , uid: String , _ completion: @escaping ( Result < Task , Swift . Error > ) -> Void ) {
74
+ public func deleteIndex( client: MeiliSearch , uid: String , _ completion: @escaping ( Result < MTask , Swift . Error > ) -> Void ) {
75
75
client. deleteIndex ( uid) { result in
76
76
switch result {
77
77
case . success( let task) :
@@ -90,12 +90,12 @@ public func deleteIndex(client: MeiliSearch, uid: String, _ completion: @escapin
90
90
}
91
91
}
92
92
93
- public func addDocuments( client: MeiliSearch , uid: String , primaryKey: String ? , _ completion: @escaping ( Result < Task , Swift . Error > ) -> Void ) {
93
+ public func addDocuments( client: MeiliSearch , uid: String , primaryKey: String ? , _ completion: @escaping ( Result < MTask , Swift . Error > ) -> Void ) {
94
94
let movie = Movie ( id: 1 , title: " test " , comment: " test movie " )
95
95
addDocuments ( client: client, uid: uid, dataset: [ movie] , primaryKey: primaryKey, completion)
96
96
}
97
97
98
- public func addDocuments< T: Encodable > ( client: MeiliSearch , uid: String , dataset: [ T ] , primaryKey: String ? , _ completion: @escaping ( Result < Task , Swift . Error > ) -> Void ) {
98
+ public func addDocuments< T: Encodable > ( client: MeiliSearch , uid: String , dataset: [ T ] , primaryKey: String ? , _ completion: @escaping ( Result < MTask , Swift . Error > ) -> Void ) {
99
99
let jsonEncoder = JSONEncoder ( )
100
100
101
101
let documents : Data
0 commit comments