aboutsummaryrefslogtreecommitdiff
path: root/lib/client.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-12-04 01:12:54 +0300
committereug-vs <eug-vs@keemail.me>2020-12-04 01:14:12 +0300
commit569cb0457b4cdcffdf325bdfe8959d55e48efc25 (patch)
treeedc092e392ef9ec619964a917017a9d40ad6f659 /lib/client.ts
parentd513b23be26bda40d40ec43258345af6e34cfdfd (diff)
downloadmongo-cronjob-569cb0457b4cdcffdf325bdfe8959d55e48efc25.tar.gz
feat!: remove context schema from client
This will allow for multiple event types in one Model.
Diffstat (limited to 'lib/client.ts')
-rw-r--r--lib/client.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/client.ts b/lib/client.ts
index eafdda5..15bd076 100644
--- a/lib/client.ts
+++ b/lib/client.ts
@@ -1,18 +1,17 @@
-import { Schema } from 'mongoose';
import Connection from './connection';
import createEventModel, { EventModel } from './event.model';
import createLogModel, { LogModel } from './log.model';
-class Client<Context> {
+class Client {
public connection: Connection;
- public Event: EventModel<Context>;
+ public Event: EventModel;
public Log: LogModel;
- constructor(connection: Connection, contextSchema: Schema) {
+ constructor(connection: Connection) {
this.connection = connection;
this.Log = createLogModel(connection);
- this.Event = createEventModel<Context>(connection, contextSchema);
+ this.Event = createEventModel(connection);
}
}