Skip to content

Commit

Permalink
fix(snippets/js): correct casing for contextual tuples in check and l…
Browse files Browse the repository at this point in the history
…ist objects (#726)

Co-authored-by: Raghd Hamzeh <[email protected]>
  • Loading branch information
ewanharris and rhamzeh committed Apr 29, 2024
1 parent 6c2b5ca commit 267c3fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Docs/SnippetViewer/CheckRequestViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const { allowed } = await fgaClient.check({
!contextualTuples
? ``
: `
contextual_tuples: [\n ${contextualTuples.map((tuple) => `${JSON.stringify(tuple)}`).join(',')}
contextualTuples: [\n ${contextualTuples.map((tuple) => `${JSON.stringify(tuple)}`).join(',')}
],`
}${!context ? `\n }` : `\n context: ${JSON.stringify(context)}\n }`}, {
authorization_model_id: '${modelId}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function listObjectsRequestViewer(lang: SupportedLanguage, opts: ListObjectsRequ
type: "${objectType}",${
contextualTuples?.length
? `
contextual_tuples: {
contextualTuples: {
tuple_keys: [${contextualTuples
.map(
(tupleKey) => `{
Expand Down

0 comments on commit 267c3fe

Please sign in to comment.