mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-24 11:14:23 +01:00
9 lines
278 B
TypeScript
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)
|
|
}
|