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

Merged
groombook-engineer[bot] merged 1 commits from fix/gro-735-clean-seed into dev 2026-04-18 10:18:39 +00:00

1 Commits

Author SHA1 Message Date
Test User 7f715ecdfc 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 02:42:06 +00:00