From fa15b90c18b570d8ae81bc0bdc85181e511ab26d Mon Sep 17 00:00:00 2001 From: Rafael Tapia Date: Fri, 8 Dec 2023 11:05:20 -0300 Subject: [PATCH] fix: type errors --- apps/meteor/ee/server/apps/storage/AppRealLogStorage.ts | 2 +- packages/model-typings/src/models/IAppLogsModel.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/meteor/ee/server/apps/storage/AppRealLogStorage.ts b/apps/meteor/ee/server/apps/storage/AppRealLogStorage.ts index d14bfb16bbbd..dbcfb53c607d 100644 --- a/apps/meteor/ee/server/apps/storage/AppRealLogStorage.ts +++ b/apps/meteor/ee/server/apps/storage/AppRealLogStorage.ts @@ -15,7 +15,7 @@ export class AppRealLogStorage extends AppLogStorage { }, options?: IAppLogStorageFindOptions, ): Promise { - return this.db.find(query, options).toArray(); + return this.db.find({ ...options, ...query }).toArray(); } async storeEntries(logEntry: ILoggerStorageEntry): Promise { diff --git a/packages/model-typings/src/models/IAppLogsModel.ts b/packages/model-typings/src/models/IAppLogsModel.ts index f73964c57687..6a6bc765cd8e 100644 --- a/packages/model-typings/src/models/IAppLogsModel.ts +++ b/packages/model-typings/src/models/IAppLogsModel.ts @@ -1,6 +1,9 @@ +import type { DeleteResult, Filter } from 'mongodb'; + import type { IBaseModel } from './IBaseModel'; // TODO: type for AppLogs export interface IAppLogsModel extends IBaseModel { resetTTLIndex(expireAfterSeconds: number): Promise; + remove(query: Filter): Promise; }