diff --git a/frontend/src/layouts/MainLayout.vue b/frontend/src/layouts/MainLayout.vue index 462ed91..4c346dd 100644 --- a/frontend/src/layouts/MainLayout.vue +++ b/frontend/src/layouts/MainLayout.vue @@ -19,7 +19,7 @@ -
+
diff --git a/frontend/src/stores/useAuthStore.ts b/frontend/src/stores/useAuthStore.ts index 7deb2cb..8887ddd 100644 --- a/frontend/src/stores/useAuthStore.ts +++ b/frontend/src/stores/useAuthStore.ts @@ -51,7 +51,7 @@ export const useAuthStore = defineStore('auth', { this.permissions = (tokenJson as any).permissions ?? 'user'; api.defaults.headers['Authorization'] = 'Bearer ' + this.token; this.currentDomain = await this.getCurrentDomain(); - this.userInfo = await this.getUserInfo(this.userId!); + this.userInfo = await this.getUserInfo(); router.push(this.returnUrl || '/'); return true; } catch (e) { @@ -76,8 +76,8 @@ export const useAuthStore = defineStore('auth', { kintoneUrl: data.url, })); }, - async getUserInfo(id:string):Promise{ - const resp = (await api.get(`api/v1/users/${id}`)).data; + async getUserInfo():Promise{ + const resp = (await api.get(`api/v1/users/me`)).data; return { firstName: resp.first_name, lastName: resp.last_name,