Skip to content

Commit

Permalink
add collection names
Browse files Browse the repository at this point in the history
  • Loading branch information
SamratSahoo committed Mar 7, 2024
1 parent cd77b27 commit 3f82c15
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/src/controllers/events/click-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createClickEvent, paginatedGetClickEvents } from "@/src/actions/click-e
import { getProjectByClientKey } from "@/src/actions/project";
import { relogRequestHandler } from "@/src/middleware/request-middleware";
import APIWrapper from "@/src/utils/api-wrapper";
import { ClickEvent, EventCategories, EventSubcategories } from "@/src/utils/types";
import { ClickEvent } from "@/src/utils/types";
import { Request } from "express";

const clickEventRoute = APIWrapper({
Expand Down
2 changes: 1 addition & 1 deletion api/src/models/click-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ClickEventSchema.pre("save", async function (this: Document & BaseEvent, next: (
});


export const ClickEventModel = (mongoose.models.ClickEvent as mongoose.Model<ClickEvent>) || mongoose.model("ClickEvent", ClickEventSchema);
export const ClickEventModel = (mongoose.models.ClickEvent as mongoose.Model<ClickEvent>) || mongoose.model("ClickEvent", ClickEventSchema, "clickevents");

export default EventDiscriminator as mongoose.Model<Document & BaseEvent & {
eventProperties: ClickEventProperties
Expand Down
2 changes: 1 addition & 1 deletion api/src/models/input-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ InputEventSchema.pre("save", async function (this: Document & BaseEvent, next: (
});


export const InputEventModel = (mongoose.models.InputEvent as mongoose.Model<InputEvent>) || mongoose.model("InputEvent", InputEventSchema);
export const InputEventModel = (mongoose.models.InputEvent as mongoose.Model<InputEvent>) || mongoose.model("InputEvent", InputEventSchema, "inputevents");

export default EventDiscriminator as mongoose.Model<Document & BaseEvent & {
eventProperties: InputEventProperties
Expand Down
2 changes: 1 addition & 1 deletion api/src/models/visit-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ VisitEventSchema.pre("save", async function (this: Document & BaseEvent, next: (
});


export const VisitEventModel = (mongoose.models.VisitEvent as mongoose.Model<VisitEvent>) || mongoose.model("VisitEvent", VisitEventSchema);
export const VisitEventModel = (mongoose.models.VisitEvent as mongoose.Model<VisitEvent>) || mongoose.model("VisitEvent", VisitEventSchema, "visitevents");

export default EventDiscriminator as mongoose.Model<Document & BaseEvent & {
eventProperties: VisitEventProperties
Expand Down

0 comments on commit 3f82c15

Please sign in to comment.