mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Can delete comments
This commit is contained in:
@ -37,6 +37,15 @@ class CommentsHelper {
|
||||
return apiToComment(response.getObject());
|
||||
}
|
||||
|
||||
/// Attempt to delete a comment
|
||||
Future<bool> delete(int id) async {
|
||||
return (await APIRequest(
|
||||
uri: "comments/delete",
|
||||
needLogin: true,
|
||||
args: {"commentID": id.toString()},
|
||||
).exec()).code == 200;
|
||||
}
|
||||
|
||||
/// Turn an API entry into a [Comment] object
|
||||
static Comment apiToComment(Map<String, dynamic> entry) {
|
||||
return Comment(
|
||||
|
Reference in New Issue
Block a user