minor bugfixes
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace OCA\NCDownloader\Search;
|
namespace OCA\NCDownloader\Search;
|
||||||
|
|
||||||
require __DIR__ . "/../../vendor/autoload.php";
|
require __DIR__ . "/../../vendor/autoload.php";
|
||||||
|
|
||||||
use OCP\AppFramework\QueryException;
|
use OCP\AppFramework\QueryException;
|
||||||
use OCP\IServerContainer;
|
use OCP\IServerContainer;
|
||||||
use Symfony\Component\HttpClient\Exception\ClientException;
|
use Symfony\Component\HttpClient\Exception\ClientException;
|
||||||
@@ -24,7 +25,7 @@ class siteSearch
|
|||||||
} catch (QueryException $e) {
|
} catch (QueryException $e) {
|
||||||
$siteInst = $this->container->query($this->defaultSite);
|
$siteInst = $this->container->query($this->defaultSite);
|
||||||
} catch (ClientException $e) {
|
} catch (ClientException $e) {
|
||||||
return ['message', $e->getMessage()];
|
return ['error' => $e->getMessage()];
|
||||||
}
|
}
|
||||||
$result = $siteInst->search($keyword);
|
$result = $siteInst->search($keyword);
|
||||||
if ($result->hasError()) {
|
if ($result->hasError()) {
|
||||||
@@ -41,5 +42,4 @@ class siteSearch
|
|||||||
$this->site = __NAMESPACE__ . '\Sites\\' . $site;
|
$this->site = __NAMESPACE__ . '\Sites\\' . $site;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user