feat: 为通知路由添加认证要求,确保用户登录后才能访问
This commit is contained in:
@@ -14,8 +14,10 @@ export const useUserStore = defineStore("user", () => {
|
||||
const isAuthenticated = computed(() => !!token.value);
|
||||
|
||||
async function updateProfile() {
|
||||
const { initializeWallet } = useWalletStore();
|
||||
const { data } = await safeClient(client.api.user.profile.get(), { silent: true });
|
||||
state.userProfile = data.value || null;
|
||||
initializeWallet();
|
||||
}
|
||||
|
||||
function setToken(value: string) {
|
||||
|
||||
Reference in New Issue
Block a user