Created a REST method to update POST content.

This commit is contained in:
Pierre 2018-01-15 19:18:05 +01:00
parent e1724ea49d
commit de69f4861f

View File

@ -357,7 +357,14 @@ class postsController {
$postID = $this->getFullAccessPostID("postID"); $postID = $this->getFullAccessPostID("postID");
//Get the post content //Get the post content
$new_content = getPostContent("new_content");
//Try to update post content
if(!components()->posts->update_content($postID, $new_content))
Rest_fatal_error(500, "An error occured while trying to update post content !");
//Success
return array("success" => "The post content has been updated !");
} }
/** /**