mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Can delete posts
This commit is contained in:
@ -56,6 +56,16 @@ class PostsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete a post
|
||||
Future<bool> delete(int id) async {
|
||||
return (await APIRequest(
|
||||
uri: "posts/delete",
|
||||
needLogin: true,
|
||||
args: {"postID": id.toString()},
|
||||
).exec())
|
||||
.isOK;
|
||||
}
|
||||
|
||||
/// Turn an API entry into a [Post] object
|
||||
Post _apiToPost(Map<String, dynamic> map) {
|
||||
// Parse comments
|
||||
|
Reference in New Issue
Block a user