@lomray/microservice-users
Version:
Users microservice based on NodeJS & inverted json.
21 lines (17 loc) • 730 B
JavaScript
;
var tslib = require('tslib');
var microserviceHelpers = require('@lomray/microservice-helpers');
var index = require('../constants/index.js');
const defaultConfig = {
passwordSaltRounds: index.MS_USER_PASSWORD_SALT_ROUNDS,
removedAccountRestoreTime: index.MS_USER_REMOVE_ACCOUNT_RESTORE_TIME,
changePasswordClearTokensType: index.MS_USER_CHANGE_PASSWORD_CLEAR_TOKENS_TYPE,
};
/**
* Get remote config
*/
const remoteConfig = () => tslib.__awaiter(void 0, void 0, void 0, function* () {
const conf = yield microserviceHelpers.RemoteConfig.get('config');
return Object.assign(Object.assign({}, defaultConfig), (conf !== null && conf !== void 0 ? conf : {}));
});
module.exports = remoteConfig;