fixes and api report

Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
Brian Fletcher
2023-04-06 10:54:22 +01:00
parent 7a89555e73
commit 0299dd40d6
4 changed files with 18 additions and 8 deletions
@@ -32,8 +32,10 @@ export async function loadLighthouseEntities(
const { token } = await tokenManager.getToken();
return await catalogClient.getEntities({
filter: [filter],
token,
});
return await catalogClient.getEntities(
{
filter: [filter],
},
{ token },
);
}
@@ -24,6 +24,7 @@ import { Config } from '@backstage/config';
import { LighthouseRestApi } from '@backstage/plugin-lighthouse-common';
import { stringifyEntityRef } from '@backstage/catalog-model';
import { LighthouseAuditScheduleImpl } from '../config';
import { TokenManager } from '@backstage/backend-common';
/** @public **/
export interface CreateLighthouseSchedulerOptions {
@@ -79,10 +80,12 @@ export async function createScheduler(
logger.info('Running Lighthouse Audit Task');
const { token } = await tokenManager.getToken();
const websitesWithUrl = await catalogClient.getEntities({
filter: [filter],
token,
});
const websitesWithUrl = await catalogClient.getEntities(
{
filter: [filter],
},
{ token },
);
let index = 0;
for (const entity of websitesWithUrl.items) {