store events into a collection
This commit is contained in:
@@ -21,6 +21,7 @@ export async function createOrg(input: CreateOrgInput, tenantId: string) {
|
||||
dbEvents.emit(
|
||||
"change",
|
||||
{
|
||||
tenantId: tenantId,
|
||||
type: "insert",
|
||||
collection: "orgs",
|
||||
document: org,
|
||||
@@ -99,6 +100,7 @@ export async function updateOrg(
|
||||
dbEvents.emit(
|
||||
"change",
|
||||
{
|
||||
tenantId: tenantId,
|
||||
type: "update",
|
||||
collection: "orgs",
|
||||
document: updateOrgResult,
|
||||
@@ -119,6 +121,7 @@ export async function deleteOrg(orgId: string, tenantId: string) {
|
||||
dbEvents.emit(
|
||||
"change",
|
||||
{
|
||||
tenantId: tenantId,
|
||||
type: "delete",
|
||||
collection: "orgs",
|
||||
document: {
|
||||
|
||||
Reference in New Issue
Block a user