Add authentication server, dev CLI, Docker multi-service setup, and cross-platform improvements

This commit is contained in:
Ilya Groshev
2026-04-21 16:49:44 +03:00
parent 43d6527b42
commit a3fbb1aeba
121 changed files with 4523 additions and 2888 deletions
+4 -2
View File
@@ -10,19 +10,21 @@ import (
func (s *SQLiteStore) LoadUser(userId int64) (store.UserState, error) {
var u store.UserState
var fbId sql.NullInt64
err := s.db.QueryRow(`SELECT user_id, uuid, player_id, os_type, platform_type, user_restriction_type,
register_datetime, game_start_datetime, latest_version, birth_year, birth_month,
backup_token, charge_money_this_month FROM users WHERE user_id = ?`, userId).Scan(
backup_token, charge_money_this_month, facebook_id FROM users WHERE user_id = ?`, userId).Scan(
&u.UserId, &u.Uuid, &u.PlayerId, &u.OsType, &u.PlatformType, &u.UserRestrictionType,
&u.RegisterDatetime, &u.GameStartDatetime, &u.LatestVersion, &u.BirthYear, &u.BirthMonth,
&u.BackupToken, &u.ChargeMoneyThisMonth)
&u.BackupToken, &u.ChargeMoneyThisMonth, &fbId)
if err == sql.ErrNoRows {
return u, store.ErrNotFound
}
if err != nil {
return u, fmt.Errorf("load users: %w", err)
}
u.FacebookId = fbId.Int64
initMaps(&u)