Unify request value handling

This commit is contained in:
Michael 2022-01-16 14:04:20 +00:00
parent 4319136421
commit 4724000d06
16 changed files with 105 additions and 73 deletions

View file

@ -54,13 +54,13 @@ class Create extends BaseApi
$uid = BaseApi::getCurrentUserID();
$type = $this->parameters['extension'] ?? '';
// input params
$desc = $request['desc'] ?? null;
$album = $request['album'] ?? null;
$allow_cid = $request['allow_cid'] ?? null;
$deny_cid = $request['deny_cid' ] ?? null;
$allow_gid = $request['allow_gid'] ?? null;
$deny_gid = $request['deny_gid' ] ?? null;
// input params
$desc = $this->getRequestValue($request, 'desc');
$album = $this->getRequestValue($request, 'album');
$allow_cid = $this->getRequestValue($request, 'allow_cid');
$deny_cid = $this->getRequestValue($request, 'deny_cid');
$allow_gid = $this->getRequestValue($request, 'allow_gid');
$deny_gid = $this->getRequestValue($request, 'deny_gid');
// do several checks on input parameters
// we do not allow calls without album string