feat: Re-enable profile page and allow editing name
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 4m48s

This commit is contained in:
2024-06-15 10:28:38 -04:00
parent d063b0cf0d
commit 6ec4a1e025
3 changed files with 76 additions and 13 deletions

View File

@@ -103,11 +103,17 @@ export const useAuthStore = defineStore('auth', () => {
return account.deleteSession('current').then((currentUser.value = null));
}
async function updateName(name: string) {
await account.updateName(name);
currentUser.value = await account.get();
}
return {
currentUser,
getUserNameById,
hasRequiredRole,
register,
updateName,
login,
googleLogin,
discordLogin,