add comment to group-only

This commit is contained in:
Kuchenpirat 2024-02-02 16:41:31 +00:00
parent a04b6983e7
commit 9cc59e81d6

View File

@ -5,6 +5,7 @@ interface 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) {
redirect("/")
}