(request: NextRequest)
| 5 | export const dynamic = "force-dynamic"; |
| 6 | |
| 7 | export 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 |
nothing calls this directly
no test coverage detected