Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Jun 4, 2024
1 parent b74c64e commit ab1a66d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ export default class Task extends ETL {
features: []
};

const filteredAgencies = [];
if (layer.environment.Agencies && layer.environment.Agencies.length) {
let filteredAgencies: Number[] = [];

Check failure on line 50 in task.ts

View workflow job for this annotation

GitHub Actions / test

Don't use `Number` as a type. Use number instead
if (layer.environment.Agencies && Array.isArray(layer.environment.Agencies) && layer.environment.Agencies.length) {
const ids = new Set();
layer.environment.Agencies.forEach((a) => { ids.add(a.id) });
filteredAgencies = login.agencies.filter((a) => {
filteredAgencies = login.agencies.filter((a: { id: number }) => {
return ids.has(a.id);
})
} else {
filteredAgencies = login.agencies.map((a) => {
filteredAgencies = login.agencies.map((a: { id: number }) => {
return a.id;
});
}
Expand All @@ -65,7 +65,7 @@ export default class Task extends ETL {
agencyForm.append('operation', 'get_archived_alerts_csv');
agencyForm.append('auth', login.jwt);
agencyForm.append('post_data', JSON.stringify({
agency_id: agency.id,
agency_id: agency,
from_date: moment().subtract(6, 'hours').unix() * 1000,
to_date: moment().unix() * 1000
}));
Expand Down

0 comments on commit ab1a66d

Please sign in to comment.