Skip to content

Commit

Permalink
fix(Search): fix query recording
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeaturner committed Jun 9, 2024
1 parent 59ce727 commit 6ba7ef1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 0 additions & 1 deletion server/api/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,6 @@ async function addToSearchQueryCache(query: string, scope: string) {
orgID: process.env.ORG_ID,
})

// @ts-ignore
if(!org?.FEAT_RecordSearchQueries) return true; // Check if feature flag is enabled

searchQueryCache.push({
Expand Down
15 changes: 15 additions & 0 deletions server/models/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export interface OrganizationInterface extends Document {
commonsModules?: CommonsModuleSettings;
showCollections?: boolean;
assetFilterExclusions?: string[];
FEAT_AssetTagsManager?: boolean;
FEAT_PedagogyProjectTags?: boolean;
FEAT_RecordSearchQueries?: boolean;
}

const OrganizationSchema = new Schema<OrganizationInterface>(
Expand Down Expand Up @@ -184,6 +187,18 @@ const OrganizationSchema = new Schema<OrganizationInterface>(
* Inherent asset filters that should not be displayed in the Commons.
*/
assetFilterExclusions: [String],
/**
* Whether the Asset Tags Manager feature is enabled.
*/
FEAT_AssetTagsManager: Boolean,
/**
* Whether the Pedagogy Project Tags feature is enabled.
*/
FEAT_PedagogyProjectTags: Boolean,
/**
* Whether the Record Search Queries feature is enabled.
*/
FEAT_RecordSearchQueries: Boolean,
},
{
timestamps: true,
Expand Down

0 comments on commit 6ba7ef1

Please sign in to comment.