mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-20 23:21:06 +02:00
refactor(web): simplify redirect response construction in callback route
This commit is contained in:
parent
97ac02eba8
commit
c3a96aa532
1 changed files with 3 additions and 3 deletions
|
|
@ -16,9 +16,9 @@ export async function GET(
|
||||||
};
|
};
|
||||||
const result = JSON.stringify(payload);
|
const result = JSON.stringify(payload);
|
||||||
|
|
||||||
const redirectUrl = new URL(`/dashboard/${search_space_id}/new-chat`, request.url);
|
const response = NextResponse.redirect(`/dashboard/${search_space_id}/new-chat`, {
|
||||||
|
status: 302,
|
||||||
const response = NextResponse.redirect(redirectUrl, { status: 302 });
|
});
|
||||||
response.cookies.set(OAUTH_RESULT_COOKIE, result, {
|
response.cookies.set(OAUTH_RESULT_COOKIE, result, {
|
||||||
path: "/",
|
path: "/",
|
||||||
maxAge: 60,
|
maxAge: 60,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue