Skip to content

Commit 763f70d

Browse files
committed
refactor(#921): Update the params order
Udpate the static method params order for consistency as mentioned. Fixes #921
1 parent 6cd2c17 commit 763f70d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib/indexes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ class Index<T = Record<string, any>> {
184184
* @method create
185185
*/
186186
static async create<T = Record<string, any>>(
187-
config: Config,
188187
uid: string,
189-
options: IndexOptions = {}
188+
options: IndexOptions = {},
189+
config: Config
190190
): Promise<Index<T>> {
191191
const url = `indexes`
192192
const req = new HttpRequests(config)

src/lib/meilisearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class MeiliSearch {
9595
uid: string,
9696
options: IndexOptions = {}
9797
): Promise<Index<T>> {
98-
return await Index.create<T>(this.config, uid, options)
98+
return await Index.create<T>(uid, options, this.config)
9999
}
100100

101101
/**

0 commit comments

Comments
 (0)