Skip to content

Commit

Permalink
🔨 chore: fix failing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Apr 9, 2022
1 parent 41d2c2b commit 0f96be4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/api/src/controllers/leo/incidents/IncidentController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import { Socket } from "services/SocketService";
import type { z } from "zod";
import { UsePermissions, Permissions } from "middlewares/UsePermissions";
import type { MiscCadSettings } from "@snailycad/types";
import { assignedUnitsInclude, findUnit } from "controllers/dispatch/911-calls/Calls911Controller";
import { assignedUnitsInclude } from "controllers/dispatch/911-calls/Calls911Controller";
import { officerOrDeputyToUnit } from "lib/leo/officerOrDeputyToUnit";
import { findUnit } from "lib/leo/findUnit";

export const incidentInclude = {
creator: { include: leoProperties },
Expand Down Expand Up @@ -217,13 +218,9 @@ export class IncidentController {
) {
await Promise.all(
(data.unitsInvolved ?? []).map(async (id: string) => {
const { unit, type } = await findUnit(
id,
{
NOT: { status: { shouldDo: ShouldDoType.SET_OFF_DUTY } },
},
true,
);
const { unit, type } = await findUnit(id, {
NOT: { status: { shouldDo: ShouldDoType.SET_OFF_DUTY } },
});

if (!unit) {
throw new BadRequest("unitOffDuty");
Expand Down

0 comments on commit 0f96be4

Please sign in to comment.