Skip to content

Commit b1e6e0e

Browse files
committed
Fix last test, code sample
1 parent 2c58550 commit b1e6e0e

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.code-samples.meilisearch.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,10 +711,7 @@ tenant_token_guide_generate_sdk_1: |-
711711
const apiKeyUid = '85c3c2f9-bdd6-41f1-abd8-11fcf80e0f76'
712712
const expiresAt = new Date('2025-12-20') // optional
713713
714-
const token = await generateTenantToken(apiKeyUid, searchRules, {
715-
apiKey: apiKey,
716-
expiresAt: expiresAt,
717-
})
714+
const token = await generateTenantToken({ apiKey, apiKeyUid, searchRules, expiresAt })
718715
tenant_token_guide_search_sdk_1: |-
719716
const frontEndClient = new MeiliSearch({ host: 'http://localhost:7700', apiKey: token })
720717
frontEndClient.index('patient_medical_records').search('blood test')

tests/env/typescript-browser/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ function greeter(person: string) {
2222
user
2323
)} this is the list of all your indexes: \n ${uids.join(', ')}`
2424

25-
console.log(await generateTenantToken('e489fe16-3381-431b-bee3-00430192915d', [], { apiKey: config.apiKey })) // Resolved using the `browser` field
25+
console.log(await generateTenantToken({ apiKey: config.apiKey, apiKeyUid: 'e489fe16-3381-431b-bee3-00430192915d' })) // Resolved using the `browser` field
2626
})()

0 commit comments

Comments
 (0)