diff options
author | eug-vs <eug-vs@keemail.me> | 2020-12-04 01:12:54 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-12-04 01:14:12 +0300 |
commit | 569cb0457b4cdcffdf325bdfe8959d55e48efc25 (patch) | |
tree | edc092e392ef9ec619964a917017a9d40ad6f659 /lib/client.ts | |
parent | d513b23be26bda40d40ec43258345af6e34cfdfd (diff) | |
download | mongo-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.ts | 9 |
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); } } |