MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / POST

Function POST

examples/astro/src/pages/api/langbase/pipes/run.ts:6–17  ·  view source on GitHub ↗
({request})

Source from the content-addressed store, hash-verified

4import type {APIRoute} from 'astro';
5
6export const POST: APIRoute = async ({request}) => {
7 const runOptions = await request.json();
8
9 // 1. Initiate the Pipe.
10 const pipe = new Pipe(getPipeSummary());
11
12 // 2. Run the pipe
13 const result = await pipe.run(runOptions);
14
15 // 3. Return the response stringified.
16 return new Response(JSON.stringify(result));
17};

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
getPipeSummaryFunction · 0.85

Tested by

no test coverage detected