MCPcopy Create free account
hub / github.com/altic-dev/Pilot / POST

Function POST

src/app/api/experiment-progress/route.ts:7–30  ·  view source on GitHub ↗
(request: NextRequest)

Source from the content-addressed store, hash-verified

5export const dynamic = "force-dynamic";
6
7export async function POST(request: NextRequest) {
8 try {
9 const { inputHash } = await request.json();
10
11 if (!inputHash) {
12 return NextResponse.json({ error: "inputHash is required" }, { status: 400 });
13 }
14
15 const executionId = progressStore.getExecutionIdByInputHash(inputHash);
16
17 if (!executionId) {
18 return NextResponse.json({ executionId: null }, { status: 200 });
19 }
20
21 logger.info("Execution ID lookup successful", { inputHash, executionId });
22 return NextResponse.json({ executionId }, { status: 200 });
23 } catch (error) {
24 logger.error("Failed to lookup execution ID", { error });
25 return NextResponse.json(
26 { error: "Internal server error" },
27 { status: 500 }
28 );
29 }
30}
31

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected