mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Handle comments notifications
This commit is contained in:
@ -84,6 +84,20 @@ class PostsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a single post information
|
||||
Future<Post> getSingle(int postID) async {
|
||||
final response = await APIRequest(
|
||||
uri: "posts/get_single",
|
||||
args: {"postID": postID.toString()},
|
||||
needLogin: true,
|
||||
).exec();
|
||||
|
||||
if (!response.isOK)
|
||||
throw Exception("Could not get information about the post!");
|
||||
|
||||
return _apiToPost(response.getObject());
|
||||
}
|
||||
|
||||
/// Create a new post
|
||||
///
|
||||
/// This function crash in case of error
|
||||
|
Reference in New Issue
Block a user