From 2e16d685eb5b37e022e7cbd6d4f1ea6cc05f9620 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Tue, 2 Sep 2025 18:00:48 -0400 Subject: wip: zen --- cloud/app/src/routes/auth/index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cloud/app/src/routes/auth/index.ts (limited to 'cloud/app/src/routes/auth/index.ts') diff --git a/cloud/app/src/routes/auth/index.ts b/cloud/app/src/routes/auth/index.ts new file mode 100644 index 000000000..308ae2d1d --- /dev/null +++ b/cloud/app/src/routes/auth/index.ts @@ -0,0 +1,13 @@ +import { Account } from "@opencode/cloud-core/account.js" +import { redirect } from "@solidjs/router" +import type { APIEvent } from "@solidjs/start/server" +import { withActor } from "~/context/auth.withActor" + +export async function GET(input: APIEvent) { + try { + const workspaces = await withActor(async () => Account.workspaces()) + return redirect(`/workspace/${workspaces[0].id}`) + } catch { + return redirect("/auth/authorize") + } +} -- cgit v1.2.3