Skip to main content

max / makenotwork

Fix SSH key lookup query: suspended_at IS NOT NULL as boolean The users table has suspended_at (timestamp), not suspended (boolean). Cast to boolean for the SshKeyUserLookup struct. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author: Max J. <87768334+MaxJMath@users.noreply.github.com> · 2026-03-29 21:11 UTC
Commit: 3033911a2a4a793903586feeb4fdb9ae64c1dd1d
Parent: 289cca1
1 file changed, +2 insertions, -1 deletion
@@ -96,7 +96,8 @@ pub async fn lookup_user_by_fingerprint(
96 96 let row = sqlx::query_as::<_, SshKeyUserLookup>(
97 97 r#"
98 98 SELECT u.id AS user_id, u.username, u.display_name, u.email,
99 - u.creator_tier, u.can_create_projects, u.suspended
99 + u.creator_tier, u.can_create_projects,
100 + (u.suspended_at IS NOT NULL) AS suspended
100 101 FROM ssh_keys sk
101 102 JOIN users u ON u.id = sk.user_id
102 103 WHERE sk.fingerprint = $1