mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-06-23 15:31:37 -04:00
add comment to group-only
This commit is contained in:
parent
a04b6983e7
commit
9cc59e81d6
@ -5,6 +5,7 @@ interface GroupOnlyRedirectParams {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function ({ $auth, route, redirect }: GroupOnlyRedirectParams) {
|
export default function ({ $auth, route, redirect }: GroupOnlyRedirectParams) {
|
||||||
|
// this can only be used for routes that have a groupSlug parameter (e.g. /g/:groupSlug/...)
|
||||||
if (route.params.groupSlug !== $auth.user.groupSlug) {
|
if (route.params.groupSlug !== $auth.user.groupSlug) {
|
||||||
redirect("/")
|
redirect("/")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user