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 location is archived.
function wixLocations_onLocationArchiveStatus(
event: LocationArchiveStatus,
): void;
Contains information about the archived location and metadata for the event.
// Place this code in the events.js file
// of your site's Backend section.
// Add the file if it doesn't exist.
export function wixLocations_onLocationArchiveStatus(event) {
const archivedTime = event.metadata.eventTime;
console.log(
`Location was archived at ${archivedTime}. Event details:`,
event,
);
}
/* Full event object:
* {
* "data": {
* "_id": "489d0ea1-9eb4-4215-9616-98e297c7337e"
* },
* "metadata": {
* "entityId": "489d0ea1-9eb4-4215-9616-98e297c7337e",
* "eventTime": "2023-11-13T08:00:47.696025Z",
* "id": "a92d9e8b-abd7-4903-a954-5a6848f6f4eb",
* "triggeredByAnonymizeRequest": false
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.