Use the $request variable

This commit is contained in:
Michael 2022-01-16 07:35:20 +00:00
parent 8ff2cc3976
commit f11bf08a7b
11 changed files with 28 additions and 28 deletions

View file

@ -50,12 +50,12 @@ class Photo extends BaseApi
$uid = BaseApi::getCurrentUserID();
$type = $this->parameters['extension'] ?? '';
if (empty($_REQUEST['photo_id'])) {
if (empty($request['photo_id'])) {
throw new HTTPException\BadRequestException('No photo id.');
}
$scale = (!empty($_REQUEST['scale']) ? intval($_REQUEST['scale']) : false);
$photo_id = $_REQUEST['photo_id'];
$scale = (!empty($request['scale']) ? intval($request['scale']) : false);
$photo_id = $request['photo_id'];
// prepare json/xml output with data from database for the requested photo
$data = ['photo' => $this->friendicaPhoto->createFromId($photo_id, $scale, $uid, $type)];