add medreport schema

This commit is contained in:
Danel Kungla
2025-07-09 13:31:37 +03:00
parent 9371ff7710
commit d9198a8a12
73 changed files with 420 additions and 270 deletions

View File

@@ -79,12 +79,11 @@ async function JoinTeamAccountPage(props: JoinTeamAccountPageProps) {
// we need to verify the user isn't already in the account
// we do so by checking if the user can read the account
// if the user can read the account, then they are already in the account
const { data: isAlreadyTeamMember } = await client.rpc(
'is_account_team_member',
{
const { data: isAlreadyTeamMember } = await client
.schema('medreport')
.rpc('is_account_team_member', {
target_account_id: invitation.account.id,
},
);
});
// if the user is already in the account redirect to the home page
if (isAlreadyTeamMember) {