return token on post creation

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
alpha1
Maxence Lange 2018-11-28 10:15:25 -01:00
rodzic a43e0c31de
commit 8b068521c8
1 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -140,9 +140,14 @@ class LocalController extends Controller {
$post->setType($this->get('type', $data, NoteService::TYPE_PUBLIC));
/** @var ACore $activity */
$this->postService->createPost($post, $activity);
$token = $this->postService->createPost($post, $activity);
return $this->directSuccess($activity->getObject());
return $this->success(
[
'post' => $activity->getObject(),
'token' => $token
]
);
} catch (Exception $e) {
return $this->fail($e);
}