Skip to content

Instantly share code, notes, and snippets.

@shanwixcode
Created February 16, 2023 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanwixcode/31798892999d20a94f8b278c3e34247c to your computer and use it in GitHub Desktop.
Save shanwixcode/31798892999d20a94f8b278c3e34247c to your computer and use it in GitHub Desktop.
import wixData from 'wix-data';
let options = {
"suppressAuth": true
};
export function wixLoyalty_onAccountCreated(event) {
const contactId = event.entity.contactId;
let object = {
loyaltyId: event.entity._id,
contactId: contactId,
memberId: contactId
};
wixData.insert('users', object, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment