Route landing account sign-ins to checkout

This commit is contained in:
2569718930@qq.com
2026-06-14 03:14:10 +08:00
parent 8e775e0429
commit 5d0f2d4505
7 changed files with 38 additions and 14 deletions
+5 -5
View File
@@ -51,13 +51,13 @@ async function resolvePostLoginRedirect({
Authorization: `Bearer ${token}`,
},
});
if (!response.ok) return nextPath;
if (!response.ok) return TERMINAL_CHECKOUT_PATH;
const payload = await response.json();
return payload?.subscription_active === false
? TERMINAL_CHECKOUT_PATH
: nextPath;
return payload?.subscription_active === true
? nextPath
: TERMINAL_CHECKOUT_PATH;
} catch {
return nextPath;
return TERMINAL_CHECKOUT_PATH;
}
}