mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
change in progress
This commit is contained in:
16
dashboard/server/services/DataService.ts
Normal file
16
dashboard/server/services/DataService.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { VisitModel } from "@schema/metrics/VisitSchema";
|
||||
import { EventModel } from "@schema/metrics/EventSchema";
|
||||
|
||||
import type { Model } from "mongoose";
|
||||
|
||||
|
||||
export type TModelName = keyof typeof allowedModels;
|
||||
|
||||
export const allowedModels: Record<string, { model: Model<any> }> = {
|
||||
'events': {
|
||||
model: EventModel,
|
||||
},
|
||||
'visits': {
|
||||
model: VisitModel,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user