From 5deac4d35b987a24ec8a82840e3d874e0b6da09f Mon Sep 17 00:00:00 2001 From: Joan Gallego Girona Date: Mon, 5 Aug 2024 09:06:02 +0200 Subject: [PATCH] Fix tenants watch query select (#7097) * Fix tenants watch query select featureFlag and 2 other properties were missing int the mongoose schema definition * fix lint error --- app/api/tenants/specs/tenantsModel.spec.ts | 6 ++++++ app/api/tenants/tenantsModel.ts | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/app/api/tenants/specs/tenantsModel.spec.ts b/app/api/tenants/specs/tenantsModel.spec.ts index 55fd80f00e..5d5c057ae7 100644 --- a/app/api/tenants/specs/tenantsModel.spec.ts +++ b/app/api/tenants/specs/tenantsModel.spec.ts @@ -50,6 +50,9 @@ describe('tenantsModel', () => { activityLogs: 'path', stats: 'un-needed data', healthChecks: 'un-needed data', + featureFlags: { + s3Storage: false, + }, }, { name: 'tenant two', @@ -78,6 +81,9 @@ describe('tenantsModel', () => { attachments: 'path', customUploads: 'path', activityLogs: 'path', + featureFlags: { + s3Storage: false, + }, }); expect(tenantTwo).toEqual({ _id: expect.any(ObjectId), diff --git a/app/api/tenants/tenantsModel.ts b/app/api/tenants/tenantsModel.ts index c99395d97d..373c4663cc 100644 --- a/app/api/tenants/tenantsModel.ts +++ b/app/api/tenants/tenantsModel.ts @@ -28,6 +28,11 @@ const mongoSchema = new mongoose.Schema({ attachments: String, customUploads: String, activityLogs: String, + featureFlags: { + s3Storage: Boolean, + }, + globalMatomo: { id: String, url: String }, + ciMatomoActive: Boolean, }); type DBTenant = Partial & { name: string };