mirror of
https://github.com/friendica/friendica
synced 2025-04-23 07:50:12 +00:00
Add missing Twitter API routes for IDs
This commit is contained in:
parent
1d5206d594
commit
20934d73b0
2 changed files with 8 additions and 5 deletions
|
@ -21,7 +21,6 @@
|
|||
|
||||
namespace Friendica\Module\Api\Twitter\Statuses;
|
||||
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
|
@ -45,10 +44,12 @@ class Retweet extends BaseApi
|
|||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
$id = $request['id'] ?? 0;
|
||||
|
||||
if (empty($id)) {
|
||||
throw new BadRequestException('Item id not specified');
|
||||
if (!empty($this->parameters['id'])) {
|
||||
$id = (int)$this->parameters['id'];
|
||||
} elseif (!empty($request['id'])) {
|
||||
$id = (int)$request['id'];
|
||||
} else {
|
||||
throw new BadRequestException('An id is missing.');
|
||||
}
|
||||
|
||||
$fields = ['uri-id', 'network', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue