From 5e0f0f165cab29f1cab72bbcdb190284e35a7273 Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Thu, 31 Oct 2024 11:00:35 -0400 Subject: [PATCH] linting --- handlers/admin-post/doDeleteFee.d.ts | 4 +++- handlers/admin-post/doDeleteFee.ts | 4 ++-- handlers/admin-post/doDeleteFeeCategory.d.ts | 4 +++- handlers/admin-post/doDeleteFeeCategory.ts | 4 ++-- handlers/admin-post/doDeleteLotOccupantType.d.ts | 4 +++- handlers/admin-post/doDeleteLotOccupantType.ts | 4 ++-- handlers/admin-post/doDeleteLotStatus.d.ts | 4 +++- handlers/admin-post/doDeleteLotStatus.ts | 4 ++-- handlers/admin-post/doDeleteLotType.d.ts | 4 +++- handlers/admin-post/doDeleteLotType.ts | 3 +-- handlers/admin-post/doDeleteLotTypeField.d.ts | 4 +++- handlers/admin-post/doDeleteLotTypeField.ts | 3 +-- handlers/admin-post/doDeleteOccupancyType.d.ts | 4 +++- handlers/admin-post/doDeleteOccupancyType.ts | 3 +-- handlers/admin-post/doDeleteOccupancyTypeField.d.ts | 4 +++- handlers/admin-post/doDeleteOccupancyTypeField.ts | 5 ++--- handlers/admin-post/doDeleteOccupancyTypePrint.d.ts | 5 ++++- handlers/admin-post/doDeleteOccupancyTypePrint.ts | 11 +++++++---- .../admin-post/doDeleteWorkOrderMilestoneType.d.ts | 4 +++- handlers/admin-post/doDeleteWorkOrderMilestoneType.ts | 5 ++--- 20 files changed, 53 insertions(+), 34 deletions(-) diff --git a/handlers/admin-post/doDeleteFee.d.ts b/handlers/admin-post/doDeleteFee.d.ts index 19d32e4d..5875c5fb 100644 --- a/handlers/admin-post/doDeleteFee.d.ts +++ b/handlers/admin-post/doDeleteFee.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteFee.ts b/handlers/admin-post/doDeleteFee.ts index 146c8076..e00d48ad 100644 --- a/handlers/admin-post/doDeleteFee.ts +++ b/handlers/admin-post/doDeleteFee.ts @@ -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, response: Response ): Promise { const success = await deleteRecord( 'Fees', - request.body.feeId as string, + request.body.feeId, request.session.user as User ) diff --git a/handlers/admin-post/doDeleteFeeCategory.d.ts b/handlers/admin-post/doDeleteFeeCategory.d.ts index 19d32e4d..9a714146 100644 --- a/handlers/admin-post/doDeleteFeeCategory.d.ts +++ b/handlers/admin-post/doDeleteFeeCategory.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteFeeCategory.ts b/handlers/admin-post/doDeleteFeeCategory.ts index c590d470..21b29915 100644 --- a/handlers/admin-post/doDeleteFeeCategory.ts +++ b/handlers/admin-post/doDeleteFeeCategory.ts @@ -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, response: Response ): Promise { const success = await deleteRecord( 'FeeCategories', - request.body.feeCategoryId as string, + request.body.feeCategoryId, request.session.user as User ) diff --git a/handlers/admin-post/doDeleteLotOccupantType.d.ts b/handlers/admin-post/doDeleteLotOccupantType.d.ts index 19d32e4d..0ab4d4a1 100644 --- a/handlers/admin-post/doDeleteLotOccupantType.d.ts +++ b/handlers/admin-post/doDeleteLotOccupantType.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteLotOccupantType.ts b/handlers/admin-post/doDeleteLotOccupantType.ts index 4ad542b3..5f1fbe03 100644 --- a/handlers/admin-post/doDeleteLotOccupantType.ts +++ b/handlers/admin-post/doDeleteLotOccupantType.ts @@ -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, response: Response ): Promise { const success = await deleteRecord( 'LotOccupantTypes', - request.body.lotOccupantTypeId as string, + request.body.lotOccupantTypeId, request.session.user as User ) diff --git a/handlers/admin-post/doDeleteLotStatus.d.ts b/handlers/admin-post/doDeleteLotStatus.d.ts index 19d32e4d..8b6aa056 100644 --- a/handlers/admin-post/doDeleteLotStatus.d.ts +++ b/handlers/admin-post/doDeleteLotStatus.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteLotStatus.ts b/handlers/admin-post/doDeleteLotStatus.ts index 3b5d6be0..fa984fe6 100644 --- a/handlers/admin-post/doDeleteLotStatus.ts +++ b/handlers/admin-post/doDeleteLotStatus.ts @@ -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, response: Response ): Promise { const success = await deleteRecord( 'LotStatuses', - request.body.lotStatusId as string, + request.body.lotStatusId, request.session.user as User ) diff --git a/handlers/admin-post/doDeleteLotType.d.ts b/handlers/admin-post/doDeleteLotType.d.ts index 19d32e4d..3f806b54 100644 --- a/handlers/admin-post/doDeleteLotType.d.ts +++ b/handlers/admin-post/doDeleteLotType.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteLotType.ts b/handlers/admin-post/doDeleteLotType.ts index 95800c56..335df967 100644 --- a/handlers/admin-post/doDeleteLotType.ts +++ b/handlers/admin-post/doDeleteLotType.ts @@ -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, response: Response ): Promise { const success = await deleteRecord( @@ -20,4 +20,3 @@ export default async function handler( lotTypes }) } - diff --git a/handlers/admin-post/doDeleteLotTypeField.d.ts b/handlers/admin-post/doDeleteLotTypeField.d.ts index 19d32e4d..35463876 100644 --- a/handlers/admin-post/doDeleteLotTypeField.d.ts +++ b/handlers/admin-post/doDeleteLotTypeField.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteLotTypeField.ts b/handlers/admin-post/doDeleteLotTypeField.ts index 1ae123e7..709ce2bf 100644 --- a/handlers/admin-post/doDeleteLotTypeField.ts +++ b/handlers/admin-post/doDeleteLotTypeField.ts @@ -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, response: Response ): Promise { const success = await deleteRecord( @@ -20,4 +20,3 @@ export default async function handler( lotTypes }) } - diff --git a/handlers/admin-post/doDeleteOccupancyType.d.ts b/handlers/admin-post/doDeleteOccupancyType.d.ts index 19d32e4d..24c978d9 100644 --- a/handlers/admin-post/doDeleteOccupancyType.d.ts +++ b/handlers/admin-post/doDeleteOccupancyType.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteOccupancyType.ts b/handlers/admin-post/doDeleteOccupancyType.ts index a8c58b20..ccd0ccbd 100644 --- a/handlers/admin-post/doDeleteOccupancyType.ts +++ b/handlers/admin-post/doDeleteOccupancyType.ts @@ -7,7 +7,7 @@ import { } from '../../helpers/functions.cache.js' export default async function handler( - request: Request, + request: Request, response: Response ): Promise { const success = await deleteRecord( @@ -25,4 +25,3 @@ export default async function handler( allOccupancyTypeFields }) } - diff --git a/handlers/admin-post/doDeleteOccupancyTypeField.d.ts b/handlers/admin-post/doDeleteOccupancyTypeField.d.ts index 19d32e4d..5f3ebdc8 100644 --- a/handlers/admin-post/doDeleteOccupancyTypeField.d.ts +++ b/handlers/admin-post/doDeleteOccupancyTypeField.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteOccupancyTypeField.ts b/handlers/admin-post/doDeleteOccupancyTypeField.ts index 2f0b0579..756f44ec 100644 --- a/handlers/admin-post/doDeleteOccupancyTypeField.ts +++ b/handlers/admin-post/doDeleteOccupancyTypeField.ts @@ -7,12 +7,12 @@ import { } from '../../helpers/functions.cache.js' export default async function handler( - request: Request, + request: Request, response: Response ): Promise { const success = await deleteRecord( 'OccupancyTypeFields', - request.body.occupancyTypeFieldId as string, + request.body.occupancyTypeFieldId, request.session.user as User ) @@ -25,4 +25,3 @@ export default async function handler( allOccupancyTypeFields }) } - diff --git a/handlers/admin-post/doDeleteOccupancyTypePrint.d.ts b/handlers/admin-post/doDeleteOccupancyTypePrint.d.ts index 19d32e4d..b630f44e 100644 --- a/handlers/admin-post/doDeleteOccupancyTypePrint.d.ts +++ b/handlers/admin-post/doDeleteOccupancyTypePrint.d.ts @@ -1,2 +1,5 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteOccupancyTypePrint.ts b/handlers/admin-post/doDeleteOccupancyTypePrint.ts index 783c1153..e3ef5cbf 100644 --- a/handlers/admin-post/doDeleteOccupancyTypePrint.ts +++ b/handlers/admin-post/doDeleteOccupancyTypePrint.ts @@ -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 { 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 ) @@ -25,4 +29,3 @@ export default async function handler( allOccupancyTypeFields }) } - diff --git a/handlers/admin-post/doDeleteWorkOrderMilestoneType.d.ts b/handlers/admin-post/doDeleteWorkOrderMilestoneType.d.ts index 19d32e4d..229a4051 100644 --- a/handlers/admin-post/doDeleteWorkOrderMilestoneType.d.ts +++ b/handlers/admin-post/doDeleteWorkOrderMilestoneType.d.ts @@ -1,2 +1,4 @@ import type { Request, Response } from 'express'; -export default function handler(request: Request, response: Response): Promise; +export default function handler(request: Request, response: Response): Promise; diff --git a/handlers/admin-post/doDeleteWorkOrderMilestoneType.ts b/handlers/admin-post/doDeleteWorkOrderMilestoneType.ts index 76ecde07..838a0bca 100644 --- a/handlers/admin-post/doDeleteWorkOrderMilestoneType.ts +++ b/handlers/admin-post/doDeleteWorkOrderMilestoneType.ts @@ -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, response: Response ): Promise { const success = await deleteRecord( 'WorkOrderMilestoneTypes', - request.body.workOrderMilestoneTypeId as string, + request.body.workOrderMilestoneTypeId, request.session.user as User ) @@ -20,4 +20,3 @@ export default async function handler( workOrderMilestoneTypes }) } -