mirror of
https://github.com/friendica/friendica
synced 2024-11-19 07:03:40 +00:00
Merge pull request #11164 from MrPetovan/bug/11163-api-photo-create
Fix wrong default value in Module\Api\Friendica\Photo\Create::post
This commit is contained in:
commit
4298afd479
2 changed files with 11 additions and 4 deletions
|
@ -973,10 +973,17 @@ class Photo
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param int $uid User ID
|
* @param int $uid User ID
|
||||||
* @param array $files uploaded file array
|
* @param array $files uploaded file array
|
||||||
|
* @param string $album
|
||||||
|
* @param string|null $allow_cid
|
||||||
|
* @param string|null $allow_gid
|
||||||
|
* @param string $deny_cid
|
||||||
|
* @param string $deny_gid
|
||||||
|
* @param string $desc
|
||||||
|
* @param string $resource_id
|
||||||
* @return array photo record
|
* @return array photo record
|
||||||
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function upload(int $uid, array $files, string $album = '', string $allow_cid = null, string $allow_gid = null, string $deny_cid = '', string $deny_gid = '', string $desc = '', string $resource_id = ''): array
|
public static function upload(int $uid, array $files, string $album = '', string $allow_cid = null, string $allow_gid = null, string $deny_cid = '', string $deny_gid = '', string $desc = '', string $resource_id = ''): array
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Create extends BaseApi
|
||||||
$type = $this->getRequestValue($this->parameters, 'extension', 'json');
|
$type = $this->getRequestValue($this->parameters, 'extension', 'json');
|
||||||
|
|
||||||
// input params
|
// input params
|
||||||
$desc = $this->getRequestValue($request, 'desc');
|
$desc = $this->getRequestValue($request, 'desc') ?? '';
|
||||||
$album = $this->getRequestValue($request, 'album');
|
$album = $this->getRequestValue($request, 'album');
|
||||||
$allow_cid = $this->getRequestValue($request, 'allow_cid');
|
$allow_cid = $this->getRequestValue($request, 'allow_cid');
|
||||||
$deny_cid = $this->getRequestValue($request, 'deny_cid');
|
$deny_cid = $this->getRequestValue($request, 'deny_cid');
|
||||||
|
|
Loading…
Reference in a new issue