This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when a badge is deleted.
function wixBadges_onBadgeDeleted(event: BadgeDeleted): void;
// Place this code in the events.js file
// of your site's Backend section.
// Add the file if it doesn't exist.
export function wixBadges_onBadgeDeleted(event) {
const eventTime = event.metadata.eventTime;
console.log(`Badge has been deleted at ${eventTime}`);
}
/* Full event object:
* {
* "metadata": {
* "entityId": "baef3e0b-c3cb-455c-bed4-b139ed0dcc93",
* "eventTime": "2024-03-29T08:57:53.336347061Z",
* "id": "d09d6a47-dd9f-40e8-bab0-80a9b277a3d2",
* "triggeredByAnonymizeRequest": false
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.