Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: handle redirect param when logged in (#3516)

Liu Ji6235794fa35e
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index b01640c070..bd30d11980 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -977,6 +977,10 @@ router.beforeEach((to, from, next) => {
to.name === PASSWORD_FORGOT_MODULE
) {
if (isLoggedIn) {
+ if (typeof to.query.redirect === "string") {
+ location.replace(to.query.redirect);
+ return;
+ }
next({ name: HOME_MODULE, replace: true });
} else {
if (to.name === ACTIVATE_MODULE) {