eliminar e tentativa de partilhar
This commit is contained in:
@@ -79,7 +79,19 @@ class GameController {
|
||||
print("Erro ao criar jogo: $e");
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
// ELIMINAR JOGO
|
||||
Future<bool> deleteGame(String gameId) async {
|
||||
try {
|
||||
await _supabase.from('games').delete().eq('id', gameId);
|
||||
// Como o Supabase tem Cascade Delete (se configurado), vai apagar também
|
||||
// as stats e shot_locations associadas a este game_id automaticamente.
|
||||
return true;
|
||||
} catch (e) {
|
||||
print("Erro ao eliminar jogo: $e");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void dispose() {}
|
||||
}
|
||||
Reference in New Issue
Block a user