Skip to content

Commit

Permalink
Merge #487
Browse files Browse the repository at this point in the history
487: Update code samples for API key creation r=bidoubiwa a=moy2010



# Pull Request

## What does this PR do?
Update code samples to reflect the up-to-date API

## PR checklist
Please check if your PR fulfills the following requirements:
- [ ] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [ ] Have you read the contributing guidelines?
- [ ] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: moy2010 <moy2010@gmail.com>
  • Loading branch information
meili-bors[bot] and moy2010 authored Jul 3, 2023
2 parents 170bd13 + 45ec73d commit 673f4a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1510,8 +1510,9 @@ get_all_keys_1: |-
.await
.unwrap();
create_a_key_1: |-
let mut key_options = KeyBuilder::new("Add documents: Products API key");
let mut key_options = KeyBuilder::new();
key_options
.with_name("Add documents: Products API key")
.with_action(Action::DocumentsAdd)
.with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))
.with_index("products");
Expand Down Expand Up @@ -1562,8 +1563,9 @@ security_guide_update_key_1: |-
.update(&client);
security_guide_create_key_1: |-
let client = Client::new("http://localhost:7700", Some("masterKey"));
let mut key_options = KeyBuilder::new("Search patient records key");
let mut key_options = KeyBuilder::new();
key_options
.with_name("Search patient records key")
.with_action(Action::Search)
.with_expires_at(time::macros::datetime!(2023 - 01 - 01 00:00:00 UTC))
.with_index("patient_medical_records");
Expand Down

0 comments on commit 673f4a5

Please sign in to comment.