Spaces:
Sleeping
Sleeping
Viktoria435 commited on
Commit ·
5eb7d21
1
Parent(s): c426414
Remove unnecessary NotFoundException check in WorkerService to streamline worker filtering logic.
Browse files
src/worker/worker.service.ts
CHANGED
|
@@ -39,13 +39,6 @@ export class WorkerService {
|
|
| 39 |
const filtered = enriched.filter((w) =>
|
| 40 |
w.workDays.some((day) => workDays.includes(day)),
|
| 41 |
);
|
| 42 |
-
|
| 43 |
-
if (filtered.length === 0) {
|
| 44 |
-
throw new NotFoundException(
|
| 45 |
-
`No workers found with work days: ${workDays.join(', ')}`,
|
| 46 |
-
);
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
return filtered;
|
| 50 |
}
|
| 51 |
|
|
|
|
| 39 |
const filtered = enriched.filter((w) =>
|
| 40 |
w.workDays.some((day) => workDays.includes(day)),
|
| 41 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
return filtered;
|
| 43 |
}
|
| 44 |
|