From c2691113c65a8512ee34fc9736ee4c054c8f24ff Mon Sep 17 00:00:00 2001 From: azdak Date: Wed, 18 Dec 2024 17:03:07 -0600 Subject: [PATCH] Update addScansByProperty.ts --- src/routes/addScansByProperty.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/addScansByProperty.ts b/src/routes/addScansByProperty.ts index 7dee564..091a4cd 100644 --- a/src/routes/addScansByProperty.ts +++ b/src/routes/addScansByProperty.ts @@ -4,17 +4,17 @@ import { LambdaClient, InvokeCommand } from "@aws-sdk/client-lambda"; const lambda = new LambdaClient(); export const addScansByProperty = async ({ request, reply }) => { - if (!request.query.propertyId) { + if (!request.body.propertyId) { return { status: "error", message: "PropertyId is required.", }; } - if (!validateUuid(request.query.propertyId)) + if (!validateUuid(request.body.propertyId)) return { status: "error", - message: `${request.query.propertyId} is not a valid of UUID.`, + message: `${request.body.propertyId} is not a valid of UUID.`, }; //await db.connect(); @@ -29,7 +29,7 @@ export const addScansByProperty = async ({ request, reply }) => { } }`, variables: { - property_id: request.query.propertyId, + property_id: request.body.propertyId, }, });