fix(rectification): start new case from homepage
Staging Backend Quality Gate / validate (pull_request) Successful in 24m42s
Staging Backend Quality Gate / publish (pull_request) Has been skipped

This commit is contained in:
Jesse_Chen
2026-08-12 21:20:51 +08:00
parent 90199b4d9b
commit 4deb5c2378
12 changed files with 273 additions and 45 deletions
@@ -12,7 +12,7 @@ export const runtime = "nodejs";
/**
* GET /api/rectification/cases/entry-summary
*
* Server-truth homepage CTA: "开始生时校正" / "继续上次校正" / "再次校正".
* Server-truth context for homepage copy; the primary homepage action always creates.
*/
export async function GET() {
let supabase;
@@ -28,7 +28,7 @@ function serviceErrorResponse(error: unknown) {
*
* Browser sends only { intent, requestId } (+ sessionId for intent=session).
* The server derives the user from the session, normalizes the profile and
* decides resume-or-create. Double-click / multi-tab are idempotent.
* creates for homepage/new or restores the exact requested session. Retries are idempotent.
*/
export async function POST(request: Request) {
let supabase;