budibase/packages/backend-core/src/events/events.ts

10 lines
392 B
TypeScript
Raw Normal View History

2022-05-05 09:32:14 +02:00
import { Event } from "@budibase/types"
import { processors } from "./processors"
2022-05-23 23:14:44 +02:00
import * as identification from "./identification"
2022-04-01 22:29:44 +02:00
2022-05-23 23:14:44 +02:00
export const publishEvent = async (event: Event, properties: any) => {
// in future this should use async events via a distributed queue.
const identity = identification.getCurrentIdentity()
await processors.processEvent(event, identity, properties)
2022-04-01 22:29:44 +02:00
}