v0.9.4 fix for db registration and server compile with cgo

This commit is contained in:
2026-06-10 08:08:20 -04:00
parent 84bd5d40c8
commit d7d31283d6
5 changed files with 78 additions and 24 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ func DefaultUserLimits() UserLimits {
func (s *Store) GetUserCounts() (total, permanent, temp int, err error) {
query := `SELECT
COUNT(*) as total,
COALESCE(SUM(CASE WHEN account_type = 'permanent' THEN 1 ELSE 0 END), 0) as permanent,
COALESCE(SUM(CASE WHEN account_type = 'temp' THEN 1 ELSE 0 END), 0) as temp
COUNT(CASE WHEN account_type = 'permanent' THEN 1 END) as permanent,
COUNT(CASE WHEN account_type = 'temp' THEN 1 END) as temp
FROM users`
err = s.db.QueryRow(query).Scan(&total, &permanent, &temp)