Main auth and account flows now tested and working

This commit is contained in:
Michael Dausmann
2023-04-25 15:01:23 +10:00
parent 577e79478e
commit 5d21a5731b
13 changed files with 192 additions and 50 deletions

View File

@@ -140,17 +140,10 @@ export const useAccountStore = defineStore('account', {
},
async claimOwnershipOfAccount(){
const { $client } = useNuxtApp();
const { membership } = await $client.account.claimOwnershipOfAccount.mutate();
if(membership){
if(this.activeMembership){
this.activeMembership.access = membership.access;
}
for(const m of this.activeAccountMembers){
if(m.id === membership.id){
m.access = membership.access;
}
}
const { memberships } = await $client.account.claimOwnershipOfAccount.mutate();
if(memberships){
this.activeAccountMembers = memberships;
this.activeMembership!.access = ACCOUNT_ACCESS.OWNER
}
}
}