mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
Convert the auth_queries.go user + session reads/writes and profile_queries.go to the sqlc-generated layer, adding shared userFromGen/sessionFromGen mappers (db/mappers.go) for the int64/*string -> int/bool/string domain-model narrowing. Delegated: GetUserByID, GetUserByUsername, UpdateUserStatus, UpdateUserTOTPSecret, ResetAllUserStatuses, BanUser, UnbanUser, ListMembers, CreateSession (EvictOldestSessions + InsertSession), GetSessionByTokenHash, GetSessionWithBanStatus, DeleteSession, DeleteOtherSessions, DeleteExpiredSessions, TouchSession, UpdateUserProfile, UpdateUserPassword, ListUserSessions, DeleteSessionByID (query changed to :execresult so the RowsAffected ErrNotFound check is preserved). Behavior and public signatures unchanged. Verified: go build ./...; go test ./db ./service ./auth; sqlc-verify. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UA17KPvqGBX3XbXYnMf1rA