1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Handle comments notifications

This commit is contained in:
2019-11-02 12:46:17 +01:00
parent 5250eb59b4
commit 053035f350
5 changed files with 96 additions and 5 deletions

View File

@ -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