Exceptions
This commit is contained in:
parent
a5b5f0e455
commit
7adc3460b3
|
@ -13,18 +13,18 @@ class Starred extends BaseModule
|
|||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
exit();
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException();
|
||||
}
|
||||
|
||||
if (empty($parameters['item'])) {
|
||||
exit;
|
||||
} else {
|
||||
$itemId = intval($parameters['item']);
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException();
|
||||
}
|
||||
|
||||
$itemId = intval($parameters['item']);
|
||||
|
||||
$item = Item::selectFirstForUser(local_user(), ['starred'], ['uid' => local_user(), 'id' => $itemId]);
|
||||
if (empty($item)) {
|
||||
exit();
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException();
|
||||
}
|
||||
|
||||
$starred = !(bool)$item['starred'];
|
||||
|
|
Loading…
Reference in a new issue