kopia lustrzana https://github.com/nextcloud/social
fix token creation
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/462/head
rodzic
47b2268021
commit
2fb50cbefb
|
@ -117,7 +117,7 @@ class NoteBoost extends Base {
|
|||
$this->setName('social:note:boost')
|
||||
->addArgument('userid', InputArgument::REQUIRED, 'userId of the author')
|
||||
->addArgument('note', InputArgument::REQUIRED, 'Note to boost')
|
||||
->addOption('unboost', '',InputOption::VALUE_NONE, 'Unboost')
|
||||
->addOption('unboost', '', InputOption::VALUE_NONE, 'Unboost')
|
||||
->setDescription('Boost a note');
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ class NoteBoost extends Base {
|
|||
if (!$input->getOption('unboost')) {
|
||||
$activity = $this->boostService->create($actor, $noteId, $token);
|
||||
} else {
|
||||
$activity= $this->boostService->delete($actor, $noteId, $token);
|
||||
$activity = $this->boostService->delete($actor, $noteId, $token);
|
||||
}
|
||||
|
||||
echo 'object: ' . json_encode($activity, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n";
|
||||
|
|
|
@ -161,7 +161,7 @@ class LocalController extends Controller {
|
|||
$post->setType($this->get('type', $data, Stream::TYPE_PUBLIC));
|
||||
$post->setHashtags($this->getArray('hashtags', $data, []));
|
||||
|
||||
/** @var ACore $activity */
|
||||
$token = '';
|
||||
$activity = $this->postService->createPost($post, $token);
|
||||
|
||||
return $this->success(
|
||||
|
@ -214,6 +214,8 @@ class LocalController extends Controller {
|
|||
public function postBoost(string $postId): DataResponse {
|
||||
try {
|
||||
$this->initViewer(true);
|
||||
|
||||
$token = '';
|
||||
$announce = $this->boostService->create($this->viewer, $postId, $token);
|
||||
|
||||
return $this->success(
|
||||
|
@ -241,7 +243,8 @@ class LocalController extends Controller {
|
|||
try {
|
||||
$this->initViewer(true);
|
||||
|
||||
$token = $this->boostService->delete($this->viewer, $postId, $announce);
|
||||
$token = '';
|
||||
$announce = $this->boostService->delete($this->viewer, $postId, $token);
|
||||
|
||||
return $this->success(
|
||||
[
|
||||
|
|
Ładowanie…
Reference in New Issue