Fix delete empty table
This commit is contained in:
parent
176c5753d7
commit
1d1044c3f8
@ -113,8 +113,9 @@ final class TableManagement {
|
||||
player.$table.id = nil
|
||||
guard let table = WaitingTable(oldTable: oldTable, removing: player.name) else {
|
||||
tables[oldTable.id] = nil
|
||||
return Table.query(on: database).filter(\.$id == oldTable.id).delete().flatMap {
|
||||
player.update(on: database)
|
||||
return player.update(on: database).flatMap {
|
||||
print("Updating player")
|
||||
return Table.query(on: database).filter(\.$id == oldTable.id).delete()
|
||||
}
|
||||
}
|
||||
/// `player.canStartGame` is automatically set to false, because table is not full
|
||||
|
Loading…
Reference in New Issue
Block a user