mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 15:10:49 +08:00
feat: change single episode monitoring status
This commit is contained in:
@@ -48,6 +48,19 @@ class SeriesDetailData
|
||||
var name = (sp.data as Map<String, dynamic>)["name"];
|
||||
return name;
|
||||
}
|
||||
|
||||
Future<void> changeMonitoringStatus(int episodeId, bool b) async {
|
||||
final dio = APIs.getDio();
|
||||
var resp = await dio.post(APIs.changeMonitoringUrl, data: {
|
||||
"episode_id": episodeId,
|
||||
"monitor": b,
|
||||
});
|
||||
var sp = ServerResponse.fromJson(resp.data);
|
||||
if (sp.code != 0) {
|
||||
throw sp.message;
|
||||
}
|
||||
ref.invalidateSelf();
|
||||
}
|
||||
}
|
||||
|
||||
class SeriesDetails {
|
||||
|
||||
Reference in New Issue
Block a user