Search...
assignEvents( )
Assigns events to a single category.
Admin Method
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function assignEvents(categoryId: string, eventId: Array<string>): Promise<void>
assignEvents Parameters
NAME
TYPE
DESCRIPTION
categoryId
string
ID of category to which events should be assigned.
eventId
Array<
string
>A list of events IDs.
Returns
Return Type:
Promise<
void
>Was this helpful?
assignEvents example
Copy Code
1import { categories } from 'wix-events.v2';23 async function assignEvents(categoryId, eventId) {4 try {5 const result = await categories.assignEvents(categoryId, eventId);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13