MCPcopy Create free account
hub / github.com/CopilotKit/OpenGenerativeUI / POST

Function POST

apps/app/src/app/api/pick/route.ts:36–44  ·  view source on GitHub ↗
(req: NextRequest)

Source from the content-addressed store, hash-verified

34
35/** POST — submit picked prompt (mobile calls this when user picks an option) */
36export async function POST(req: NextRequest) {
37 const { sessionId, prompt } = await req.json();
38 if (!sessionId || !prompt) {
39 return NextResponse.json({ error: "missing sessionId or prompt" }, { status: 400 });
40 }
41
42 setSession(sessionId, { status: "picked", prompt });
43 return NextResponse.json({ ok: true });
44}

Callers

nothing calls this directly

Calls 1

setSessionFunction · 0.90

Tested by

no test coverage detected