kopia lustrzana https://github.com/nextcloud/social
fixing route/controller
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/374/head
rodzic
9ac8eb965b
commit
3c1def1d1c
|
@ -71,6 +71,8 @@ return [
|
|||
['name' => 'Local#postCreate', 'url' => '/api/v1/post', 'verb' => 'POST'],
|
||||
['name' => 'Local#postDelete', 'url' => '/api/v1/post', 'verb' => 'DELETE'],
|
||||
|
||||
['name' => 'Local#postBoost', 'url' => '/api/v1/post/boost', 'verb' => 'POST'],
|
||||
|
||||
['name' => 'Local#actionFollow', 'url' => '/api/v1/current/follow', 'verb' => 'PUT'],
|
||||
['name' => 'Local#actionUnfollow', 'url' => '/api/v1/current/follow', 'verb' => 'DELETE'],
|
||||
|
||||
|
|
|
@ -201,15 +201,14 @@ class LocalController extends Controller {
|
|||
*
|
||||
* @NoAdminRequired
|
||||
*
|
||||
* @param array $data
|
||||
* @param string $postId
|
||||
*
|
||||
* @return DataResponse
|
||||
*/
|
||||
public function boostPost(array $data): DataResponse {
|
||||
public function postBoost(string $postId): DataResponse {
|
||||
try {
|
||||
$this->initViewer(true);
|
||||
|
||||
$postId = $this->get('postId', $data, '');
|
||||
$token = $this->noteService->createBoost($this->viewer, $postId, $announce);
|
||||
|
||||
return $this->success(
|
||||
|
|
Ładowanie…
Reference in New Issue