mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
API: Parameter cleanup
This commit is contained in:
parent
453e6a9d75
commit
e3d227f3c9
22 changed files with 147 additions and 80 deletions
|
@ -39,11 +39,13 @@ class Index extends BaseApi
|
|||
throw new HTTPException\ForbiddenException();
|
||||
}
|
||||
|
||||
$since_id = $_REQUEST['since_id'] ?? 0;
|
||||
$count = $_REQUEST['count'] ?? 20;
|
||||
$request = self::getRequest([
|
||||
'since_id' => 0,
|
||||
'count' => 0,
|
||||
]);
|
||||
|
||||
$condition = ["`id` > ? AND `uid` = ?", $since_id, self::$current_user_id];
|
||||
$params = ['limit' => $count];
|
||||
$condition = ["`id` > ? AND `uid` = ?", $request['since_id'], self::$current_user_id];
|
||||
$params = ['limit' => $request['count']];
|
||||
$events = DBA::selectToArray('event', [], $condition, $params);
|
||||
|
||||
$items = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue