mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
fix: create user_binary row on character creation (#176)
New characters were missing their user_binary record, preventing them from entering their house. Both sign server and API character creation paths now insert the row. A backfill migration fixes existing databases.
This commit is contained in:
@@ -42,6 +42,10 @@ func (r *APICharacterRepository) Create(ctx context.Context, userID uint32, last
|
||||
RETURNING id, name, is_female, weapon_type, hr, gr, last_login`,
|
||||
userID, lastLogin,
|
||||
)
|
||||
if err != nil {
|
||||
return character, err
|
||||
}
|
||||
_, err = r.db.ExecContext(ctx, `INSERT INTO user_binary (id) VALUES ($1)`, character.ID)
|
||||
return character, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user