mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-05 20:42:23 -07:00
fix: pwa share target (#5557)
Some checks failed
Docker Nightly Production / Backend Server Tests (push) Has been cancelled
Docker Nightly Production / Frontend Tests (push) Has been cancelled
Docker Nightly Production / Build Package (push) Has been cancelled
Release Drafter / ✏️ Draft release (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Docker Nightly Production / Build Tagged Release (push) Has been cancelled
Docker Nightly Production / Notify Discord (push) Has been cancelled
Some checks failed
Docker Nightly Production / Backend Server Tests (push) Has been cancelled
Docker Nightly Production / Frontend Tests (push) Has been cancelled
Docker Nightly Production / Build Package (push) Has been cancelled
Release Drafter / ✏️ Draft release (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Docker Nightly Production / Build Tagged Release (push) Has been cancelled
Docker Nightly Production / Notify Discord (push) Has been cancelled
This commit is contained in:
parent
969a3c9005
commit
a2a0ad1af0
1 changed files with 10 additions and 0 deletions
10
frontend/middleware/pwa-share-target-redirect.global.ts
Normal file
10
frontend/middleware/pwa-share-target-redirect.global.ts
Normal 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 });
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue