Skip to content

Commit

Permalink
Merge #1529
Browse files Browse the repository at this point in the history
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 <74670311+meili-bot@users.noreply.github.com>
  • Loading branch information
meili-bors[bot] and meili-bot authored Jul 4, 2023
2 parents 5dbd9ce + f77fb54 commit 66270e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ getting_started_add_documents_md: |-
**Use**
```js
const client = new MeiliSearch({ host: 'http://localhost:7700' })
const client = new MeiliSearch({
host: 'http://localhost:7700',
apiKey: 'aSampleMasterKey'
})
client.index('movies').addDocuments(movies)
.then((res) => console.log(res))
```
Expand Down

0 comments on commit 66270e0

Please sign in to comment.