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 TSession = {
session: string,
flowHash: string,
duration: number,
website: string,
updated_at: Date,
created_at: Date,
}
@@ -14,6 +15,7 @@ const SessionSchema = new Schema<TSession>({
project_id: { type: Types.ObjectId, index: 1 },
session: { type: String, required: true, index: 1 },
flowHash: { type: String },
website: { type: String },
duration: { type: Number, required: true, default: 0 },
updated_at: { type: Date, default: () => Date.now() },
created_at: { type: Date, default: () => Date.now(), index: true },