Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Sources/MeiliSearch/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public struct MeiliSearch {
public func createIndex(
uid: String,
primaryKey: String? = nil,
_ completion: @escaping (Result<Task, Swift.Error>) -> Void) {
_ completion: @escaping (Result<TaskInfo, Swift.Error>) -> Void) {
Indexes.create(uid: uid, primaryKey: primaryKey, config: self.config, completion)
}

Expand All @@ -93,8 +93,9 @@ public struct MeiliSearch {
value. If the request was sucessful or `Error` if a failure occured.
*/
public func getIndexes(
_ completion: @escaping (Result<[Index], Swift.Error>) -> Void) {
Indexes.getAll(config: self.config, completion)
params: IndexesQuery? = nil,
_ completion: @escaping (Result<Results<Index>, Swift.Error>) -> Void) {
Indexes.getAll(config: self.config, params: params, completion)
}

/**
Expand All @@ -109,7 +110,7 @@ public struct MeiliSearch {
public func updateIndex(
uid: String,
primaryKey: String,
_ completion: @escaping (Result<Task, Swift.Error>) -> Void) {
_ completion: @escaping (Result<TaskInfo, Swift.Error>) -> Void) {
self.index(uid).update(primaryKey: primaryKey, completion)
}

Expand All @@ -123,7 +124,7 @@ public struct MeiliSearch {
*/
public func deleteIndex(
_ uid: String,
_ completion: @escaping (Result<Task, Swift.Error>) -> Void) {
_ completion: @escaping (Result<TaskInfo, Swift.Error>) -> Void) {
self.index(uid).delete(completion)
}

Expand Down
Loading