gancio-upstream/middleware/isAdmin.js

5 lines
124 B
JavaScript
Raw Normal View History

2023-12-04 23:12:39 +01:00
export default async function ({ redirect, $auth }) {
if (!$auth?.user?.is_admin) {
return redirect('/')
}
}