MED-109: add doctor role and basic view (#45)

* MED-109: add doctor role and basic view

* add role to accounts

* remove old super admin and doctor sql
This commit is contained in:
Helena
2025-08-13 12:28:50 +03:00
committed by GitHub
parent ce7b04fda8
commit 3c6c86c7c8
32 changed files with 562 additions and 35 deletions

View File

@@ -22,4 +22,19 @@ class AdminAccountsService {
throw error;
}
}
async updateRole(
accountId: string,
role: Database['medreport']['Tables']['accounts']['Row']['application_role'],
) {
const { error } = await this.adminClient
.schema('medreport')
.from('accounts')
.update({ application_role: role })
.eq('id', accountId);
if (error) {
throw error;
}
}
}