Update src/Module/Api/Twitter/Statuses/Destroy.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
e9d8af89c2
commit
245d194f87
|
@ -40,10 +40,10 @@ class Destroy extends BaseApi
|
||||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||||
$uid = BaseApi::getCurrentUserID();
|
$uid = BaseApi::getCurrentUserID();
|
||||||
|
|
||||||
if (empty($this->parameters['id']) && !empty($request['id'])) {
|
if (!empty($this->parameters['id'])) {
|
||||||
$id = intval($request['id']);
|
|
||||||
} elseif (!empty($this->parameters['id'])) {
|
|
||||||
$id = (int)$this->parameters['id'];
|
$id = (int)$this->parameters['id'];
|
||||||
|
} elseif (!empty($request['id'])) {
|
||||||
|
$id = (int)$request['id'];
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException('An id is missing.');
|
throw new BadRequestException('An id is missing.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue