Serie Context Menu
This commit is contained in:
@@ -86,11 +86,10 @@ class BackendApi {
|
||||
// ignore: avoid_print
|
||||
final sc = res?.statusCode;
|
||||
final data = res?.data;
|
||||
print('Backend HTTP ${sc}. URL: ${_dio.options.baseUrl}, payload: $payload, data: ${data}');
|
||||
if (map != null && map.containsKey('error')) {
|
||||
throw Exception('Backend HTTP ${sc}: ${map['error']}');
|
||||
throw Exception('Backend HTTP $sc: ${map['error']}');
|
||||
}
|
||||
throw Exception('Backend HTTP ${sc}: ${data}');
|
||||
throw Exception('Backend HTTP $sc: $data');
|
||||
}
|
||||
if (map == null) {
|
||||
throw Exception('Backend: Unexpected response format');
|
||||
@@ -224,5 +223,8 @@ class BackendApi {
|
||||
final map = await _post({'action': 'get_show_episodes', 'show_id': showId});
|
||||
return (map['items'] as List).cast<Map<String, dynamic>>();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> deleteShow(int showId) async {
|
||||
await _post({'action': 'delete_show', 'show_id': showId});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user