Skip to content

Commit 298e4d2

Browse files
aaguiarzrhamzeh
andauthored
fix: JS examples to use authorizationModelId (#974)
Co-authored-by: Raghd Hamzeh <raghd.hamzeh@openfga.dev>
1 parent e5a6361 commit 298e4d2

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/components/Docs/SnippetViewer/CheckRequestViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const { allowed } = await fgaClient.check({
7373
contextualTuples: [\n ${contextualTuples.map((tuple) => `${JSON.stringify(tuple)}`).join(',')}
7474
],`
7575
}${!context ? `\n }` : `\n context: ${JSON.stringify(context)}\n }`}, {
76-
authorization_model_id: '${modelId}',
76+
authorizationModelId: '${modelId}',
7777
});
7878
7979
// allowed = ${allowed}`;

src/components/Docs/SnippetViewer/ExpandRequestViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const { tree } = await fgaClient.expand({
3232
relation: '${opts.relation}', // expand all who has '${opts.relation}' relation
3333
object: '${opts.object}', // with the object '${opts.object}'
3434
}, {
35-
authorization_model_id: '${modelId}'
35+
authorizationModelId: '${modelId}'
3636
});
3737
3838
// tree = ...`;

src/components/Docs/SnippetViewer/ListObjectsRequestViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function listObjectsRequestViewer(lang: SupportedLanguage, opts: ListObjectsRequ
9393
: ''
9494
}
9595
}, {
96-
authorization_model_id: "${modelId}",
96+
authorizationModelId: "${modelId}",
9797
});
9898
// response.objects = [${expectedResults.map((r) => `"${r}"`).join(', ')}]`;
9999
case SupportedLanguage.GO_SDK:

src/components/Docs/SnippetViewer/ListUsersRequestViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function listUsersRequestViewer(lang: SupportedLanguage, opts: ListUsersRequestV
128128
: ''
129129
}
130130
}, {
131-
authorization_model_id: "${modelId}",
131+
authorizationModelId: "${modelId}",
132132
});
133133
// response.users = [${expectedResults.users.map((u) => JSON.stringify(u)).join(',')}]`;
134134
case SupportedLanguage.GO_SDK:

src/components/Docs/SnippetViewer/WriteRequestViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ ${
103103
await fgaClient.write({
104104
${opts.relationshipTuples ? writes : ''}${separator}${opts.deleteRelationshipTuples ? deletes : ''},
105105
}, {
106-
authorization_model_id: "${modelId}"
106+
authorizationModelId: "${modelId}"
107107
});`;
108108
}
109109

0 commit comments

Comments
 (0)