update:add ci cd files ==> do not edit those file

This commit is contained in:
mahyargdz
2024-10-10 21:49:00 +03:30
parent 6fe34708a2
commit 8cf0492c87
464 changed files with 79533 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
export default function ({$auth, redirect}) {
if ($auth.loggedIn && $auth.hasScope('admin')) return true
else return redirect('/admin/login')
}
+11
View File
@@ -0,0 +1,11 @@
export default function ({route, redirect, error}) {
///////////// redirect to default local
if (route.path === '/') return redirect('/fa')
///////////// local check
const lang = ['fa', 'en']
const isLocal = lang.includes(route.params.lang)
const isAdmin = route.path.includes('/admin')
if (isLocal || isAdmin) return null
else error({statusCode: 404, message: 'Page Not Found'})
}