refactor: return proper response object (#4169)

This commit is contained in:
Dag 2024-07-31 17:30:06 +02:00 committed by GitHub
parent aa3989873c
commit 891c8979a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 69 additions and 84 deletions

View file

@ -78,13 +78,9 @@ class DerpibooruBridge extends BridgeAbstract
public function collectData()
{
$queryJson = json_decode(getContents(
self::URI
. 'api/v1/json/search/images?filter_id='
. urlencode($this->getInput('f'))
. '&q='
. urlencode($this->getInput('q'))
));
$url = self::URI . 'api/v1/json/search/images?filter_id=' . urlencode($this->getInput('f')) . '&q=' . urlencode($this->getInput('q'));
$queryJson = json_decode(getContents($url));
foreach ($queryJson->images as $post) {
$item = [];