Skip to content

Commit

Permalink
Update addScansByProperty.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
azdak committed Dec 18, 2024
1 parent 1ea38fb commit c269111
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/routes/addScansByProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -29,7 +29,7 @@ export const addScansByProperty = async ({ request, reply }) => {
}
}`,
variables: {
property_id: request.query.propertyId,
property_id: request.body.propertyId,
},
});

Expand Down

0 comments on commit c269111

Please sign in to comment.