fix(GRO-666): leave staff.user_id NULL in seed so middleware can auto-link by email #314

Merged
groombook-engineer[bot] merged 1 commits from fix/gro-735-seed-userid into dev 2026-04-17 06:35:33 +00:00

1 Commits

Author SHA1 Message Date
Test User d736467a56 fix(GRO-666): leave staff.user_id NULL in seed so middleware can auto-link by email
The resolveStaffMiddleware auto-links on first API call when staff.user_id
IS NULL. Setting userId at seed time blocks this path since Better-Auth's
user.id is opaque and unknown pre-auth. Remove userId from all staff inserts
so the middleware can populate it on first authenticated call.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-17 03:10:17 +00:00