Lots of improvements and changes
Some checks failed
Build and Deploy / Deploy Web (push) Has been cancelled
Build and Deploy / Deploy Discord Bot (push) Has been cancelled

This commit is contained in:
2023-05-27 12:02:33 +02:00
parent 98d73ea593
commit 8121b9b975
21 changed files with 3147 additions and 1599 deletions

View File

@@ -5,7 +5,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
const user = await $fetch('/api/auth/user')
useState('user', () => user)
if (to.meta.admin && !user.admin) return navigateTo('/')
if (to.meta.moderator && !user.role.moderator) return navigateTo('/')
} catch (err) {
console.log(err)