From 527d14606ecf428278842052b598fed0ba711910 Mon Sep 17 00:00:00 2001 From: Pierre Date: Tue, 16 Jan 2018 06:50:16 +0100 Subject: [PATCH] Get single post informations --- assets/js/components/posts/interface.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/assets/js/components/posts/interface.js b/assets/js/components/posts/interface.js index e6d34a85..0f737d78 100644 --- a/assets/js/components/posts/interface.js +++ b/assets/js/components/posts/interface.js @@ -25,6 +25,25 @@ ComunicWeb.components.posts.interface = { }, + /** + * Get single post informations + * + * @param {int} postID The ID of the post to get + * @param {function} callback What to do once we got post informations + */ + get_single: function(postID, callback){ + + //Prepare API request + var APIuri = "posts/get_single"; + var params = { + postID: postID + }; + + //Make the request + ComunicWeb.common.api.makeAPIrequest(APIuri, params, true, callback); + + }, + /** * Send a new post *