mirror of
https://github.com/friendica/friendica
synced 2025-04-23 19:10:13 +00:00
Reenable Twitter/Destroy tests
This commit is contained in:
parent
354c2d828a
commit
4d330f2876
3 changed files with 24 additions and 11 deletions
|
@ -26,6 +26,7 @@ use Friendica\Module\BaseApi;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
|
||||
/**
|
||||
* Destroys a specific status.
|
||||
|
@ -39,10 +40,12 @@ class Destroy extends BaseApi
|
|||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
if (empty($this->parameters['id'])) {
|
||||
$id = intval($request['id'] ?? 0);
|
||||
} else {
|
||||
if (empty($this->parameters['id']) && !empty($request['id'])) {
|
||||
$id = intval($request['id']);
|
||||
} elseif (!empty($this->parameters['id'])) {
|
||||
$id = (int)$this->parameters['id'];
|
||||
} else {
|
||||
throw new BadRequestException('An id is missing.');
|
||||
}
|
||||
|
||||
$this->logger->notice('API: api_statuses_destroy: ' . $id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue