delete games
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user