Skip to content

Commit

Permalink
Fix tenants watch query select (#7097)
Browse files Browse the repository at this point in the history
* Fix tenants watch query select

featureFlag and 2 other properties were missing int the mongoose schema
definition

* fix lint error
  • Loading branch information
daneryl authored Aug 5, 2024
1 parent a0539c5 commit 5deac4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/api/tenants/specs/tenantsModel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ describe('tenantsModel', () => {
activityLogs: 'path',
stats: 'un-needed data',
healthChecks: 'un-needed data',
featureFlags: {
s3Storage: false,
},
},
{
name: 'tenant two',
Expand Down Expand Up @@ -78,6 +81,9 @@ describe('tenantsModel', () => {
attachments: 'path',
customUploads: 'path',
activityLogs: 'path',
featureFlags: {
s3Storage: false,
},
});
expect(tenantTwo).toEqual({
_id: expect.any(ObjectId),
Expand Down
5 changes: 5 additions & 0 deletions app/api/tenants/tenantsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Tenant> & { name: string };
Expand Down

0 comments on commit 5deac4d

Please sign in to comment.