mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: del note
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1146,7 +1146,7 @@ class VideoHttp {
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
var res = await Request().post(
|
||||
final res = await Request().post(
|
||||
Api.addNote,
|
||||
data: {
|
||||
'cont_len': summary.length,
|
||||
@@ -1174,4 +1174,24 @@ class VideoHttp {
|
||||
return LoadingState.error(res.data['message']);
|
||||
}
|
||||
}
|
||||
|
||||
static Future delNote({
|
||||
required List noteIds,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
Api.delNote,
|
||||
data: {
|
||||
'note_ids': noteIds.join(','),
|
||||
'csrf': Accounts.main.csrf,
|
||||
},
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
),
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return {'status': true};
|
||||
} else {
|
||||
return {'status': false, 'msg': res.data['message']};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user