Files
opencode/cloud/app/src/context/auth.withActor.ts
2025-09-03 12:32:03 -04:00

9 lines
278 B
TypeScript

import { Actor } from "@opencode/cloud-core/actor.js"
import { getActor } from "./auth"
import { getRequestEvent } from "solid-js/web"
export async function withActor<T>(fn: () => T) {
const actor = await getActor()
return Actor.provide(actor.type, actor.properties, fn)
}