Enha: nullable roomID for player [WIP]

This commit is contained in:
Grail Finder
2025-07-03 11:00:33 +03:00
parent c82439d43a
commit 2a593739ae
4 changed files with 21 additions and 13 deletions

View File

@ -64,7 +64,7 @@ func (p *RepoProvider) PlayerSetRoomID(ctx context.Context, username, roomID str
func (p *RepoProvider) PlayerExitRoom(ctx context.Context, username string) error {
db := getDB(ctx, p.DB)
_, err := db.ExecContext(ctx, "UPDATE players SET room_id = null WHERE username = ?", username)
_, err := db.ExecContext(ctx, "UPDATE players SET room_id='', team='', role='' WHERE username = ?", username)
return err
}