1
0
Fork 0
mirror of synced 2024-06-30 20:10:54 +12:00
budibase/packages/backend-core/src/events/publishers/screen.ts

18 lines
469 B
TypeScript
Raw Normal View History

import { publishEvent } from "../events"
2022-05-04 04:13:13 +12:00
import {
2022-05-05 19:32:14 +12:00
Event,
2022-05-04 04:13:13 +12:00
Screen,
ScreenCreatedEvent,
ScreenDeletedEvent,
} from "@budibase/types"
2022-05-26 08:32:08 +12:00
export async function created(screen: Screen, timestamp?: string) {
2022-05-04 04:13:13 +12:00
const properties: ScreenCreatedEvent = {}
2022-05-26 08:32:08 +12:00
await publishEvent(Event.SCREEN_CREATED, properties, timestamp)
2022-05-04 04:13:13 +12:00
}
2022-05-24 09:14:44 +12:00
export async function deleted(screen: Screen) {
2022-05-04 04:13:13 +12:00
const properties: ScreenDeletedEvent = {}
2022-05-24 09:14:44 +12:00
await publishEvent(Event.SCREEN_DELETED, properties)
2022-05-04 04:13:13 +12:00
}