Search.../

onGalleryDeleted( )

An event that triggers when a gallery is deleted.

Description

The onGalleryDeleted() event handler runs when a gallery has been deleted. The received GalleryDeleted object contains information about the gallery that was deleted.

Note: Backend events don't work when previewing your site.

Syntax

function onGalleryDeleted(event: GalleryDeleted): void

onGalleryDeleted Parameters

NAME
TYPE
DESCRIPTION
event
Optional
GalleryDeleted

Information about a deleted gallery.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

An event triggered when a gallery is deleted

Copy Code
1// Place this code in the events.js file
2// of your site's Backend section.
3// Add the file if it doesn't exist.
4
5export function wixProGallery_onGalleryDeleted(event) {
6 const eventId = event.metadata.id;
7 const eventTime = event.metadata.eventTime;
8}
9
10/* Full event object:
11 * {
12 * "metadata": {
13 * "entityId": "b082d5aa-1e7b-44d9-91f3-ab0387825de5",
14 * "eventTime": "2022-08-04T10:00:09.559484Z",
15 * "id": "1586937f-a154-4ad1-8ccf-488a63852e63",
16 * "triggeredByAnonymizeRequest": false
17 * }
18 * }
19 */