69d8f829f1
Deploy to route.crispygoat.com / deploy (push) Successful in 5m3s
Replace nested Promise.all([insert, update]) + outer Promise.all([withBrand, cookies()]) with sequential awaits in verifyWaterPin, mirroring the admin-portal pattern from commitca79896and src/lib/water-admin-pin-auth.ts. Symptom: field PIN works once, fails after logout until reset. Root cause is the same family flagged inca79896: cookies() corrupts Next.js's request-scoped AsyncLocalStorage when called from inside a pg transaction, and nested Promise.all inside the transaction makes the failure non-deterministic. Also adds scripts/diag-water-pin.mjs for one-shot prod DB inspection if the symptom persists post-deploy.