Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Oct 31, 2024
1 parent 33e2bbe commit 5e0f0f1
Show file tree
Hide file tree
Showing 20 changed files with 53 additions and 34 deletions.
4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteFee.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
feeId: string;
}>, response: Response): Promise<void>;
4 changes: 2 additions & 2 deletions handlers/admin-post/doDeleteFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { deleteRecord } from '../../database/deleteRecord.js'
import getFeeCategories from '../../database/getFeeCategories.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { feeId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
'Fees',
request.body.feeId as string,
request.body.feeId,
request.session.user as User
)

Expand Down
4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteFeeCategory.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
feeCategoryId: string;
}>, response: Response): Promise<void>;
4 changes: 2 additions & 2 deletions handlers/admin-post/doDeleteFeeCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { deleteRecord } from '../../database/deleteRecord.js'
import getFeeCategories from '../../database/getFeeCategories.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { feeCategoryId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
'FeeCategories',
request.body.feeCategoryId as string,
request.body.feeCategoryId,
request.session.user as User
)

Expand Down
4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteLotOccupantType.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
lotOccupantTypeId: string;
}>, response: Response): Promise<void>;
4 changes: 2 additions & 2 deletions handlers/admin-post/doDeleteLotOccupantType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { deleteRecord } from '../../database/deleteRecord.js'
import { getLotOccupantTypes } from '../../helpers/functions.cache.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { lotOccupantTypeId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
'LotOccupantTypes',
request.body.lotOccupantTypeId as string,
request.body.lotOccupantTypeId,
request.session.user as User
)

Expand Down
4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteLotStatus.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
lotStatusId: string;
}>, response: Response): Promise<void>;
4 changes: 2 additions & 2 deletions handlers/admin-post/doDeleteLotStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { deleteRecord } from '../../database/deleteRecord.js'
import { getLotStatuses } from '../../helpers/functions.cache.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { lotStatusId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
'LotStatuses',
request.body.lotStatusId as string,
request.body.lotStatusId,
request.session.user as User
)

Expand Down
4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteLotType.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
lotTypeId: string;
}>, response: Response): Promise<void>;
3 changes: 1 addition & 2 deletions handlers/admin-post/doDeleteLotType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { deleteRecord } from '../../database/deleteRecord.js'
import { getLotTypes } from '../../helpers/functions.cache.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { lotTypeId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
Expand All @@ -20,4 +20,3 @@ export default async function handler(
lotTypes
})
}

4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteLotTypeField.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
lotTypeFieldId: string;
}>, response: Response): Promise<void>;
3 changes: 1 addition & 2 deletions handlers/admin-post/doDeleteLotTypeField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { deleteRecord } from '../../database/deleteRecord.js'
import { getLotTypes } from '../../helpers/functions.cache.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { lotTypeFieldId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
Expand All @@ -20,4 +20,3 @@ export default async function handler(
lotTypes
})
}

4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteOccupancyType.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
occupancyTypeId: string;
}>, response: Response): Promise<void>;
3 changes: 1 addition & 2 deletions handlers/admin-post/doDeleteOccupancyType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '../../helpers/functions.cache.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { occupancyTypeId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
Expand All @@ -25,4 +25,3 @@ export default async function handler(
allOccupancyTypeFields
})
}

4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteOccupancyTypeField.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
occupancyTypeFieldId: string;
}>, response: Response): Promise<void>;
5 changes: 2 additions & 3 deletions handlers/admin-post/doDeleteOccupancyTypeField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import {
} from '../../helpers/functions.cache.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { occupancyTypeFieldId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
'OccupancyTypeFields',
request.body.occupancyTypeFieldId as string,
request.body.occupancyTypeFieldId,
request.session.user as User
)

Expand All @@ -25,4 +25,3 @@ export default async function handler(
allOccupancyTypeFields
})
}

5 changes: 4 additions & 1 deletion handlers/admin-post/doDeleteOccupancyTypePrint.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
occupancyTypeId: string;
printEJS: string;
}>, response: Response): Promise<void>;
11 changes: 7 additions & 4 deletions handlers/admin-post/doDeleteOccupancyTypePrint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ import {
} from '../../helpers/functions.cache.js'

export default async function handler(
request: Request,
request: Request<
unknown,
unknown,
{ occupancyTypeId: string; printEJS: string }
>,
response: Response
): Promise<void> {
const success = await deleteOccupancyTypePrint(
request.body.occupancyTypeId as string,
request.body.printEJS as string,
request.body.occupancyTypeId,
request.body.printEJS,
request.session.user as User
)

Expand All @@ -25,4 +29,3 @@ export default async function handler(
allOccupancyTypeFields
})
}

4 changes: 3 additions & 1 deletion handlers/admin-post/doDeleteWorkOrderMilestoneType.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import type { Request, Response } from 'express';
export default function handler(request: Request, response: Response): Promise<void>;
export default function handler(request: Request<unknown, unknown, {
workOrderMilestoneTypeId: string;
}>, response: Response): Promise<void>;
5 changes: 2 additions & 3 deletions handlers/admin-post/doDeleteWorkOrderMilestoneType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { deleteRecord } from '../../database/deleteRecord.js'
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js'

export default async function handler(
request: Request,
request: Request<unknown, unknown, { workOrderMilestoneTypeId: string }>,
response: Response
): Promise<void> {
const success = await deleteRecord(
'WorkOrderMilestoneTypes',
request.body.workOrderMilestoneTypeId as string,
request.body.workOrderMilestoneTypeId,
request.session.user as User
)

Expand All @@ -20,4 +20,3 @@ export default async function handler(
workOrderMilestoneTypes
})
}

0 comments on commit 5e0f0f1

Please sign in to comment.