chore: track root project files and subrepos

This commit is contained in:
hajimi
2026-05-23 13:22:03 +08:00
parent 1624f023a2
commit 648ed678f3
1035 changed files with 154418 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
import { useAppStore } from '~~/stores/app'
import { useUserStore } from '~~/stores/user'
import { isEmptyObject } from '~~/utils/validate'
export default defineNuxtRouteMiddleware(async (to, from) => {
const userStore = useUserStore()
const appStore = useAppStore()
try {
if (isEmptyObject(appStore.config)) {
await appStore.getConfig()
}
if (userStore.isLogin && isEmptyObject(userStore.userInfo)) {
await userStore.getUser()
}
} catch (error) {
userStore.$reset()
}
})