mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +02:00
manage-data pages
This commit is contained in:
parent
02997cd36e
commit
19e776a772
10 changed files with 32 additions and 14 deletions
|
@ -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("/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue