From fa1e702912c4a5204df36336db989d7b9834d38b Mon Sep 17 00:00:00 2001 From: Felipe Rocha Date: Sat, 31 May 2025 18:27:16 -0300 Subject: [PATCH] docs: remove unnecessary await in permission checks (#2859) --- docs/content/docs/plugins/organization.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/docs/plugins/organization.mdx b/docs/content/docs/plugins/organization.mdx index afa1b64b..959f9572 100644 --- a/docs/content/docs/plugins/organization.mdx +++ b/docs/content/docs/plugins/organization.mdx @@ -845,7 +845,7 @@ const canCreateProjectAndCreateSale = await authClient.organization.hasPermissio Once you have defined the roles and permissions to avoid checking the permission from the server you can use the `checkRolePermission` function provided by the client. ```ts title="auth-client.ts" -const canCreateProject = await authClient.organization.checkRolePermission({ +const canCreateProject = authClient.organization.checkRolePermission({ permissions: { organization: ["delete"], }, @@ -853,7 +853,7 @@ const canCreateProject = await authClient.organization.checkRolePermission({ }); // You can also check multiple resource permissions at the same time -const canCreateProjectAndCreateSale = await authClient.organization.checkRolePermission({ +const canCreateProjectAndCreateSale = authClient.organization.checkRolePermission({ permissions: { organization: ["delete"], member: ["delete"]