Enha: nullable roomID for player [WIP]
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user