Skip to content

Commit

Permalink
style: fix prettier issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed May 8, 2024
1 parent 54aed59 commit d7a6b44
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions src/components/Docs/SnippetViewer/ListUsersRequestViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,45 +228,45 @@ var response = await fgaClient.ListUsers(body, options);
// response.ExcludedUsers = [${expectedResults.excluded_users.map((u) => JSON.stringify(u)).join(',')}]`;
case SupportedLanguage.PYTHON_SDK:
return '';
// return `
// options = {
// "authorization_model_id": "${modelId}"
// }
// return `
// options = {
// "authorization_model_id": "${modelId}"
// }

// userFilters=[UserTypeFilter(type="${userFilterType}"${userFilterRelation ? `, relation="${userFilterRelation}"` : ''})]
// userFilters=[UserTypeFilter(type="${userFilterType}"${userFilterRelation ? `, relation="${userFilterRelation}"` : ''})]

// body = ClientListUsersRequest(
// object=FgaObject(type="${objectId}, id="${objectId}"),
// relation="${relation}",
// userFilters=userFilters,${
// contextualTuples
// ? `
// contextual_tuples=[
// ${contextualTuples
// .map(
// (tuple) => `ClientTupleKey(user="${tuple.user}", relation="${tuple.relation}", object="${tuple.object}")`,
// )
// .join(',\n ')}
// ],`
// : ``
// }${
// context
// ? `
// context=dict(${Object.entries(context)
// .map(
// ([k, v]) => `
// ${k}="${v}"`,
// )
// .join(',')}
// )`
// : ''
// }
// )
// body = ClientListUsersRequest(
// object=FgaObject(type="${objectId}, id="${objectId}"),
// relation="${relation}",
// userFilters=userFilters,${
// contextualTuples
// ? `
// contextual_tuples=[
// ${contextualTuples
// .map(
// (tuple) => `ClientTupleKey(user="${tuple.user}", relation="${tuple.relation}", object="${tuple.object}")`,
// )
// .join(',\n ')}
// ],`
// : ``
// }${
// context
// ? `
// context=dict(${Object.entries(context)
// .map(
// ([k, v]) => `
// ${k}="${v}"`,
// )
// .join(',')}
// )`
// : ''
// }
// )

// response = await fga_client.list_users(body, options)
// response = await fga_client.list_users(body, options)

// # response.users = [${expectedResults.users.map((u) => JSON.stringify(u)).join(',')}]
// # response.excludedUsers = [${expectedResults.excluded_users.map((u) => JSON.stringify(u)).join(',')}]`;
// # response.users = [${expectedResults.users.map((u) => JSON.stringify(u)).join(',')}]
// # response.excludedUsers = [${expectedResults.excluded_users.map((u) => JSON.stringify(u)).join(',')}]`;
case SupportedLanguage.RPC:
return `listUsers(
"${objectId}", // list the objects that the user \`${objectId}\`
Expand Down

0 comments on commit d7a6b44

Please sign in to comment.