fix(flappy): stop deriving returnTo from x-invoke-path
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
25975db23f
commit
285de3ac14
1 changed files with 1 additions and 2 deletions
|
|
@ -18,8 +18,7 @@ export default async function FlappyPage() {
|
||||||
const { user } = await payload.auth({ headers, canSetHeaders: false });
|
const { user } = await payload.auth({ headers, canSetHeaders: false });
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
const pathname = headers.get("x-invoke-path") || "/flappy";
|
redirect(`/login?returnTo=${encodeURIComponent("/minigames/flappy")}`);
|
||||||
redirect(`/login?returnTo=${encodeURIComponent(pathname)}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const profileRes = await payload.find({
|
const profileRes = await payload.find({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue