delete games

This commit is contained in:
2025-12-02 15:39:22 +01:00
parent 46ea9d10d3
commit 2dbc0f630f
7 changed files with 570 additions and 69 deletions
+6
View File
@@ -279,6 +279,10 @@ class BackendApi {
await _post({'action': 'delete_show', 'show_id': showId});
}
Future<void> deleteGame(int igdbId) async {
await _post({'action': 'delete_game', 'igdb_id': igdbId});
}
Future<Map<String, dynamic>> setGameStatus({
required int igdbId,
required String name,
@@ -290,6 +294,7 @@ class BackendApi {
String? summary,
String? storyline,
String? coverUrl,
int? releaseYear,
}) async {
final map = await _post({
'action': 'set_game_status',
@@ -303,6 +308,7 @@ class BackendApi {
if (summary != null) 'summary': summary,
if (storyline != null) 'storyline': storyline,
if (coverUrl != null) 'cover_url': coverUrl,
if (releaseYear != null) 'release_year': releaseYear,
});
return (map['game'] as Map).cast<String, dynamic>();
}