summaryrefslogtreecommitdiffhomepage
path: root/cloud/app/src/context
diff options
context:
space:
mode:
authorFrank <[email protected]>2025-09-03 06:37:40 -0400
committerFrank <[email protected]>2025-09-03 06:37:40 -0400
commit93f2805bc2737cd6f69d2f077e7814f63e9250cf (patch)
treecaa2a8c3dec056a2c9e102b6a7be1716e7009edc /cloud/app/src/context
parent9ad4dc92966f36b9e3d52857f788ccac7c5d003a (diff)
downloadopencode-93f2805bc2737cd6f69d2f077e7814f63e9250cf.tar.gz
opencode-93f2805bc2737cd6f69d2f077e7814f63e9250cf.zip
wip: console
Diffstat (limited to 'cloud/app/src/context')
-rw-r--r--cloud/app/src/context/auth.session.ts2
-rw-r--r--cloud/app/src/context/auth.ts5
2 files changed, 2 insertions, 5 deletions
diff --git a/cloud/app/src/context/auth.session.ts b/cloud/app/src/context/auth.session.ts
index c4b3940aa..609bc364b 100644
--- a/cloud/app/src/context/auth.session.ts
+++ b/cloud/app/src/context/auth.session.ts
@@ -1,7 +1,7 @@
import { useSession } from "vinxi/http"
export interface AuthSession {
- account: Record<
+ account?: Record<
string,
{
id: string
diff --git a/cloud/app/src/context/auth.ts b/cloud/app/src/context/auth.ts
index 5f5642990..ef81cccf1 100644
--- a/cloud/app/src/context/auth.ts
+++ b/cloud/app/src/context/auth.ts
@@ -20,13 +20,10 @@ export const getActor = async (): Promise<Actor.Info> => {
if (!evt) throw new Error("No request event")
const url = new URL(evt.request.headers.has("x-server-id") ? evt.request.headers.get("referer")! : evt.request.url)
const auth = await useAuthSession()
+ auth.data.account = auth.data.account ?? {}
const splits = url.pathname.split("/").filter(Boolean)
if (splits[0] !== "workspace") {
- // TODO
- console.log("before current")
- console.log(`current: ${auth.data.current}`)
const current = auth.data.account[auth.data.current ?? ""]
- console.log("after current")
if (current) {
return {
type: "account",