Files
portabase/app/api/google/drive/callback/route.ts
T

24 lines
535 B
TypeScript
Raw Normal View History

2026-01-24 00:26:05 +01:00
export async function GET(request: Request) {
const url = new URL(request.url);
const code = url.searchParams.get("code");
2026-01-24 00:26:05 +01:00
const success = Boolean(code);
return new Response(
`
<!DOCTYPE html>
<html>
<body>
<h1>${success ? "Success" : "Failed"}</h1>
</body>
</html>
`,
{
status: success ? 200 : 400,
headers: {
"Content-Type": "text/html; charset=utf-8",
},
2026-01-24 00:26:05 +01:00
}
);
2026-01-24 00:26:05 +01:00
}