This commit is contained in:
2025-12-26 01:44:16 +06:00
parent 461cbc6f83
commit 3b3f6b6e40
2 changed files with 4 additions and 2 deletions

View File

@@ -6,7 +6,9 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
if (!me.value) {
try {
setMe(await chadApi('/me', { method: 'GET' }))
return navigateTo({ name: 'Index' })
if (to.meta.auth !== false)
return navigateTo({ name: 'Index' })
}
catch {
if (to.meta.auth !== 'guest') {

View File

@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "chad",
"version": "0.2.14",
"version": "0.2.15",
"identifier": "xyz.koptilnya.chad",
"build": {
"frontendDist": "../.output/public",