Search.../

unassignEvents( )

Unassigns events from a category.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function unassignEvents(categoryId: string, eventId: Array<string>): Promise<void>

unassignEvents Parameters

NAME
TYPE
DESCRIPTION
categoryId
string

Category ID.

eventId
Array<
string
>

A list of events IDs.

Returns

Return Type:

Promise<
void
>

Was this helpful?

unassignEvents example

Copy Code
1import { categories } from 'wix-events.v2';
2
3 async function unassignEvents(categoryId, eventId) {
4 try {
5 const result = await categories.unassignEvents(categoryId, eventId);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13