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

Function PUT

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

Source from the content-addressed store, hash-verified

21
22/** PUT — mark session as scanned (mobile calls this on page load) */
23export async function PUT(req: NextRequest) {
24 const { sessionId } = await req.json();
25 if (!sessionId) return NextResponse.json({ error: "missing sessionId" }, { status: 400 });
26
27 const existing = getSession(sessionId);
28 if (!existing || existing.status === "waiting") {
29 setSession(sessionId, { status: "scanned" });
30 }
31
32 return NextResponse.json({ ok: true });
33}
34
35/** POST — submit picked prompt (mobile calls this when user picks an option) */
36export async function POST(req: NextRequest) {

Callers

nothing calls this directly

Calls 2

getSessionFunction · 0.90
setSessionFunction · 0.90

Tested by

no test coverage detected