feat: del note

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-29 09:52:53 +08:00
parent cc774015f9
commit 347420c531
7 changed files with 273 additions and 20 deletions

View File

@@ -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']};
}
}
}