Main auth and account flows now tested and working
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export const useNotesStore = defineStore('notes', () => {
|
||||
|
||||
async function fetchNotesForCurrentUser() {
|
||||
const { $client } = useNuxtApp();
|
||||
const { notes } = await $client.notes.getForCurrentUser.query();
|
||||
const { notes } = await $client.notes.getForActiveAccount.query();
|
||||
if(notes){
|
||||
_notes.value = notes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user