minor on isAdmin middleware

This commit is contained in:
lesion 2023-12-05 18:28:34 +01:00
parent 906dca2b10
commit d7d1cd1617
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -1,5 +1,5 @@
export default async function ({ req, redirect }) { export default async function ({ $auth, redirect }) {
if (!req.user.is_admin) { if (!$auth.user.is_admin) {
return redirect('/') return redirect('/')
} }
} }