fix: redirect missing ? before query parameters
This commit is contained in:
parent
6658c28c85
commit
25fc9e23c5
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||
console.log("to.path:", to.path);
|
||||
console.log("to.fullPath:", to.fullPath);
|
||||
const loading = useState("loading");
|
||||
const accessToken = useCookie("access_token").value;
|
||||
if (["/login", "/register"].includes(to.path)) {
|
||||
|
@ -19,6 +19,6 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
|
|||
query.set("redirect_to", to.path);
|
||||
loading.value = false;
|
||||
console.log("set loading to false");
|
||||
return await navigateTo("/login" + (query ?? ""));
|
||||
return await navigateTo("/login?" + (query ?? ""));
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue