fixing route/controller

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/374/head
Maxence Lange 2019-02-22 23:17:33 -01:00
rodzic 9ac8eb965b
commit 3c1def1d1c
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -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'],

Wyświetl plik

@ -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(