Created
February 16, 2023 18:17
-
-
Save shanwixcode/31798892999d20a94f8b278c3e34247c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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