mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 10:04:54 +02:00
refactor: return proper response object (#4169)
This commit is contained in:
parent
aa3989873c
commit
891c8979a3
28 changed files with 69 additions and 84 deletions
|
@ -147,10 +147,9 @@ class OpenCVEBridge extends BridgeAbstract
|
|||
for ($i = 1; $i <= $this->getInput('pages'); $i++) {
|
||||
$queryPaginated = array_merge($query, ['page' => $i]);
|
||||
$url = $instance . '/api/cve?' . http_build_query($queryPaginated);
|
||||
$response = getContents(
|
||||
$url,
|
||||
[$authHeader]
|
||||
);
|
||||
|
||||
$response = getContents($url, [$authHeader]);
|
||||
|
||||
$titlePrefix = '';
|
||||
if (count($queries) > 1) {
|
||||
$titlePrefix = '[' . $queryName . '] ';
|
||||
|
@ -205,10 +204,8 @@ class OpenCVEBridge extends BridgeAbstract
|
|||
private function fetchContents($cveItem, $titlePrefix, $instance, $authHeader)
|
||||
{
|
||||
$url = $instance . '/api/cve/' . $cveItem->id;
|
||||
$response = getContents(
|
||||
$url,
|
||||
[$authHeader]
|
||||
);
|
||||
|
||||
$response = getContents($url, [$authHeader]);
|
||||
$datum = json_decode($response);
|
||||
|
||||
$title = $this->getTitleFromDatum($datum, $titlePrefix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue