2023-01-23 20:18:02 +01:00
|
|
|
export const buildEventEndpoints = API => ({
|
|
|
|
/**
|
|
|
|
* Publish a specific event to the backend.
|
|
|
|
*/
|
|
|
|
publishEvent: async eventType => {
|
|
|
|
return await API.post({
|
|
|
|
url: `/api/global/event/publish`,
|
|
|
|
body: {
|
|
|
|
type: eventType,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
},
|
|
|
|
})
|