add domain filter on events

This commit is contained in:
Emily
2025-02-05 16:02:32 +01:00
parent 0963201a32
commit b592695a49
10 changed files with 47 additions and 31 deletions

View File

@@ -6,6 +6,7 @@ export type TEvent = {
metadata: Record<string, string>,
session: string,
flowHash: string,
website: string,
created_at: Date
}
@@ -15,6 +16,7 @@ const EventSchema = new Schema<TEvent>({
metadata: Schema.Types.Mixed,
session: { type: String, index: 1 },
flowHash: { type: String },
website: { type: String, index: 1 },
created_at: { type: Date, default: () => Date.now(), index: true },
})