mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-25 13:08:58 +00:00
Created a REST method to update POST content.
This commit is contained in:
parent
e1724ea49d
commit
de69f4861f
@ -357,7 +357,14 @@ class postsController {
|
||||
$postID = $this->getFullAccessPostID("postID");
|
||||
|
||||
//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 !");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user