Skip to content

Commit bccfb74

Browse files
committed
syntax adjustment
1 parent 6025a7b commit bccfb74

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

components/loops_so/actions/delete-contact/delete-contact.mjs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ export default {
2929
},
3030
},
3131
async run({ $ }) {
32-
const { // eslint-disable-next-line no-unused-vars
33-
loops, infoAlert, ...data
32+
const {
33+
loops, email, userId,
3434
} = this;
35-
if (!data) {
35+
if (!email && !userId) {
3636
throw new ConfigurationError("You must provide either the contact's email address or user ID.");
3737
}
3838
const response = await loops.deleteContact({
3939
$,
40-
data,
40+
data: {
41+
email,
42+
userId,
43+
},
4144
});
4245

4346
const summary = response?.success

0 commit comments

Comments
 (0)