mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Add authentication server, dev CLI, Docker multi-service setup, and cross-platform improvements
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user