diff --git a/appinfo/routes.php b/appinfo/routes.php index 33562323..60fbd98b 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -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'], diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php index 2c21ffa2..b8e31844 100644 --- a/lib/Controller/LocalController.php +++ b/lib/Controller/LocalController.php @@ -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(