@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user