Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
despadam committed Oct 17, 2024
1 parent c66e93a commit 74398fa
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/jobs/jobs.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,7 @@ export class JobsController {
/**
* Check that the dataset files are valid
*/
async checkDatasetFiles(
datasetList: DatasetListDto[],
): Promise<void> {
async checkDatasetFiles(datasetList: DatasetListDto[]): Promise<void> {
const datasetsToCheck = datasetList.filter((x) => x.files.length > 0);
const ids = datasetsToCheck.map((x) => x.pid);
if (ids.length > 0) {
Expand All @@ -289,11 +287,9 @@ export class JobsController {
// Include origdatablocks
await Promise.all(
datasets.map(async (dataset) => {
dataset.origdatablocks = await this.origDatablocksService.findAll(
{
datasetId: dataset.pid,
},
);
dataset.origdatablocks = await this.origDatablocksService.findAll({
datasetId: dataset.pid,
});
}),
);
const result: Record<string, Set<string>> = datasets.reduce(
Expand All @@ -315,9 +311,7 @@ export class JobsController {
(acc: { pid: string; nonExistFiles: string[] }[], x) => {
const pid = x.pid;
const referenceFiles = result[pid];
const nonExistFiles = x.files.filter(
(f) => !referenceFiles.has(f),
);
const nonExistFiles = x.files.filter((f) => !referenceFiles.has(f));
if (nonExistFiles.length > 0) {
acc.push({ pid, nonExistFiles });
}
Expand Down

0 comments on commit 74398fa

Please sign in to comment.