enable update account name from account page

This commit is contained in:
Michael Dausmann
2023-04-02 17:28:52 +10:00
parent 45d671f432
commit 8fc900fbf1
5 changed files with 32 additions and 2 deletions

View File

@@ -45,6 +45,14 @@ export const useAppStore = defineStore('app', {
await this.fetchNotesForCurrentUser();
}
},
async changeAccountName(new_name: string){
if(!this.activeMembership) { return; }
const { $client } = useNuxtApp();
const { data: account } = await $client.userAccount.changeAccountName.useQuery({account_id: this.activeMembership.account_id, new_name});
if(account.value?.account){
this.activeMembership.account = account.value.account;
}
},
async changeAccountPlan(plan_id: number){
if(!this.activeMembership) { return; }
const { $client } = useNuxtApp();