@@ -7,6 +7,7 @@ const BcmiConfig = require('./config/bcmi');
7
7
const NrcedConfig = require ( './config/nrced' ) ;
8
8
const LngConfig = require ( './config/lng' ) ;
9
9
const NrptiConfig = require ( './config/nrpti' ) ;
10
+ const { featureFlag : FeatureFlag } = require ( '../models/index' ) ;
10
11
11
12
const CheckRole = function ( roles , roleName , includeSysadmin = false ) {
12
13
if ( includeSysadmin ) {
@@ -31,7 +32,7 @@ exports.protectedOptions = function (args, res, next) {
31
32
* @returns {object }
32
33
*/
33
34
exports . publicGetConfig = async function ( args , res , next ) {
34
- console . log ( "Got configuration data" ) ;
35
+ console . log ( "Sent configuration data" ) ;
35
36
let configurationData = { } ;
36
37
37
38
configurationData [ 'API_LOCATION' ] = process . env . API_LOCATION ;
@@ -48,6 +49,10 @@ exports.publicGetConfig = async function (args, res, next) {
48
49
configurationData [ 'IMPORT_TABLE_INTERVAL' ] = process . env . IMPORT_TABLE_INTERVAL ;
49
50
configurationData [ 'DEFAULT_IMPORT_TABLE_QUERY_PARAMS' ] = process . env . DEFAULT_IMPORT_TABLE_QUERY_PARAMS ;
50
51
52
+ // TODO: Put this in each respective application sub-section so we can feature-flag for each app
53
+ // independently.
54
+ configurationData [ 'FEATURE_FLAG' ] = await FeatureFlag . findOne ( { _schemaName : 'FeatureFlag' } ) ;
55
+
51
56
// get project specific confguration
52
57
// fetch the latest business area specific CommunicationPackage
53
58
// attach it to the configuration data under "COMMUNICATIONS"
0 commit comments