Add missing hasPassword property to user responses

The API contract requires hasPassword in user responses but it was
missing from toUserResponse helper and meAuthStatus handler.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
RevIQ
2026-01-09 18:31:31 +08:00
parent 5995d45e41
commit 0e6a028ef0
2 changed files with 3 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ export const toUserResponse = (user: Selectable<Users>) => ({
emailVerified: user.email_verified_at !== null,
needsSetup: user.display_name === null,
isSuperuser: user.is_superuser,
hasPassword: user.password_hash !== null,
});
/** Transform site record to API response format */