Skip to content

Commit 66270e0

Browse files
Merge #1529
1529: Update getting_started code-samples r=bidoubiwa a=meili-bot _This PR is auto-generated._ Update the code-samples.meilisearch.yml according to the [documentation issue](meilisearch/documentation#2499). The `api_key` field is missing in the instantiation of the client in the getting started samples. Add `aSampleMasterKey` as the `api_key`. cURL example: ```bash curl \ -X POST 'http://localhost:7700/indexes/movies/documents?primaryKey=id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer aSampleMasterKey' \ --data-binary `@movies.json` ```` Co-authored-by: meili-bot <[email protected]>
2 parents 5dbd9ce + f77fb54 commit 66270e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.code-samples.meilisearch.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,10 @@ getting_started_add_documents_md: |-
439439
440440
**Use**
441441
```js
442-
const client = new MeiliSearch({ host: 'http://localhost:7700' })
442+
const client = new MeiliSearch({
443+
host: 'http://localhost:7700',
444+
apiKey: 'aSampleMasterKey'
445+
})
443446
client.index('movies').addDocuments(movies)
444447
.then((res) => console.log(res))
445448
```

0 commit comments

Comments
 (0)