Skip to content

Commit 673f4a5

Browse files
Merge #487
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 <[email protected]>
2 parents 170bd13 + 45ec73d commit 673f4a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.code-samples.meilisearch.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,8 +1510,9 @@ get_all_keys_1: |-
15101510
.await
15111511
.unwrap();
15121512
create_a_key_1: |-
1513-
let mut key_options = KeyBuilder::new("Add documents: Products API key");
1513+
let mut key_options = KeyBuilder::new();
15141514
key_options
1515+
.with_name("Add documents: Products API key")
15151516
.with_action(Action::DocumentsAdd)
15161517
.with_expires_at(time::macros::datetime!(2042 - 04 - 02 00:42:42 UTC))
15171518
.with_index("products");
@@ -1562,8 +1563,9 @@ security_guide_update_key_1: |-
15621563
.update(&client);
15631564
security_guide_create_key_1: |-
15641565
let client = Client::new("http://localhost:7700", Some("masterKey"));
1565-
let mut key_options = KeyBuilder::new("Search patient records key");
1566+
let mut key_options = KeyBuilder::new();
15661567
key_options
1568+
.with_name("Search patient records key")
15671569
.with_action(Action::Search)
15681570
.with_expires_at(time::macros::datetime!(2023 - 01 - 01 00:00:00 UTC))
15691571
.with_index("patient_medical_records");

0 commit comments

Comments
 (0)