Skip to content

Commit

Permalink
Test for vanId when manually opting someone out
Browse files Browse the repository at this point in the history
  • Loading branch information
engelhartrueben committed Dec 3, 2024
1 parent 361e16f commit a54cdb0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/server/api/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,15 @@ const rootMutations = {

if (!await Van.available(organization)) return newContact;

// Checking that contact contains a vanId
// If not, return and skip next steps
try {
const c = JSON.stringify(contact.customFiels);
if (!"vanId" in c) return newContact;
} catch (exception) {
console.log(exception)
}

console.log(
"createOptOut VAN"
);
Expand Down

0 comments on commit a54cdb0

Please sign in to comment.