Skip to content

Commit

Permalink
Merge pull request #69 from yalla-coop/171-fix-webook-validator
Browse files Browse the repository at this point in the history
Fix bug that caused webhook validation to always pass
  • Loading branch information
dupreesi authored May 1, 2024
2 parents c48ea46 + edf4bb1 commit 40b8c9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/webhooks/utils/validateLineItemsAndCallHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const validateLineItemsAndCallHandler = async (
variantsFromPayload.map((v) => v.variantId)
]);

if (variantsFromDB?.rows?.length === 0) {
if (variantsFromDB?.length < 1) {
return {
statusCode: 200,
body: 'Webhook - validateLineItemsAndCallHandler: No matching variants found'
Expand Down

0 comments on commit 40b8c9f

Please sign in to comment.