1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-18 20:59:41 +02:00

fix: pwa share target (#5557)

This commit is contained in:
Kuchenpirat 2025-06-21 17:17:48 +02:00 committed by GitHub
parent 969a3c9005
commit a2a0ad1af0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,10 @@
export default defineNuxtRouteMiddleware((to) => {
if (to.path === "/r/create/url") {
const { user } = useMealieAuth();
const groupSlug = user.value?.groupSlug;
if (!groupSlug) {
return navigateTo("/login", { redirectCode: 301 });
}
return navigateTo(`/g/${groupSlug}${to.fullPath}`, { redirectCode: 301 });
}
});