MCPcopy Create free account
hub / github.com/acoyfellow/cloudbox / authorize

Function authorize

src/http.ts:281–288  ·  view source on GitHub ↗
(request: Request, spec: ComputerSpec | null, env: CloudboxBindings)

Source from the content-addressed store, hash-verified

279 return previewInContainer(runner, row.id, c.req.raw, suffix);
280});
281
282api.all("*", (c) => jsonError(c, 404, "not_found", "unknown API route"));
283
284function selectRunner(env: CloudboxBindings, input: Pick<ContainerRunRequest, "desktop"> | null | undefined): unknown {
285 return input?.desktop === true ? env.CLOUDBOX_DESKTOP_RUNNER : env.CLOUDBOX_RUNNER;
286}
287
288function runnerForRun(env: CloudboxBindings, row: RunRecord): unknown {
289 return selectRunner(env, row.input);
290}
291

Callers 1

http.tsFile · 0.70

Calls 3

jsonErrorResponseFunction · 0.90
getMethod · 0.80
isPublicDemoSpecFunction · 0.70

Tested by

no test coverage detected