From 569cb0457b4cdcffdf325bdfe8959d55e48efc25 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 4 Dec 2020 01:12:54 +0300 Subject: feat!: remove context schema from client This will allow for multiple event types in one Model. --- lib/client.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/client.ts') 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 { +class Client { public connection: Connection; - public Event: EventModel; + public Event: EventModel; public Log: LogModel; - constructor(connection: Connection, contextSchema: Schema) { + constructor(connection: Connection) { this.connection = connection; this.Log = createLogModel(connection); - this.Event = createEventModel(connection, contextSchema); + this.Event = createEventModel(connection); } } -- cgit v1.2.3