mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-01 10:43:25 -04:00
manage-data pages
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
interface AuthRedirectParams {
|
||||
interface AdminRedirectParams {
|
||||
$auth: any
|
||||
redirect: (path: string) => void
|
||||
}
|
||||
export default function ({ $auth, redirect }: AuthRedirectParams) {
|
||||
export default function ({ $auth, redirect }: AdminRedirectParams) {
|
||||
// If the user is not an admin redirect to the home page
|
||||
if (!$auth.user.admin) {
|
||||
return redirect("/")
|
||||
|
||||
Reference in New Issue
Block a user