added multiple event name support to the eventDispatcher
This commit is contained in:
@@ -33,7 +33,9 @@ export class DeliverEventService {
|
||||
const possibleEventDispatchers = await tx.eventDispatcher.findMany({
|
||||
where: {
|
||||
environmentId: eventRecord.environmentId,
|
||||
event: eventRecord.name,
|
||||
event: {
|
||||
has: eventRecord.name,
|
||||
},
|
||||
source: eventRecord.source,
|
||||
enabled: true,
|
||||
manual: false,
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- The `event` column on the `EventDispatcher` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "EventDispatcher" DROP COLUMN "event",
|
||||
ADD COLUMN "event" TEXT[];
|
||||
@@ -582,12 +582,12 @@ enum DynamicTriggerType {
|
||||
}
|
||||
|
||||
model EventDispatcher {
|
||||
id String @id @default(cuid())
|
||||
event String
|
||||
id String @id @default(cuid())
|
||||
event String[]
|
||||
source String
|
||||
payloadFilter Json?
|
||||
contextFilter Json?
|
||||
manual Boolean @default(false)
|
||||
manual Boolean @default(false)
|
||||
|
||||
dispatchableId String
|
||||
dispatchable Json
|
||||
|
||||
Reference in New Issue
Block a user