feat(confidence-engine): use server investigation persistence
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { restartInvestigation } from "@/lib/storage/server-investigation-persistence.js";
|
||||
import { withAuthenticatedApi } from "@/lib/supabase/api-auth.js";
|
||||
|
||||
async function post(_request, { params }) {
|
||||
try {
|
||||
const snapshot = await restartInvestigation(params.id);
|
||||
if (!snapshot) return Response.json({ error: "Investigation not found" }, { status: 404 });
|
||||
return Response.json({ snapshot });
|
||||
} catch {
|
||||
return Response.json({ error: "Investigation persistence request failed" }, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
||||
export const POST = withAuthenticatedApi(post);
|
||||
Reference in New Issue
Block a user