...
 
Commits (4)
......@@ -13,7 +13,7 @@
"debug": "ts-node $NODE_DEBUG_OPTION src/index.ts -- --debug",
"qstart": "node dist/index.js",
"test": "mocha --require ts-node/register --timeout 20000 test/*.ts",
"build": "rm -Rf dist && tsc --build",
"build": "rd /s /q \"dist\" && tsc --build",
"setup": "git submodule sync --recursive && git submodule update --init --recursive && yarn install && yarn build && yarn installFrontend && yarn frontend-prod && yarn installReact && yarn buildReact",
"gitconfig": "git config diff.submodule log && git config fetch.recursesubmodules on-demand && git config status.submodulesummary true && git config push.recursesubmodules on-demand && git config submodule.recurse true",
"pull": "git pull && git submodule sync --recursive && git submodule update --init --recursive",
......
const locale = process.env.LANG;
const locale = process.env.LANG || 'fr';
import {asyncCheckOrMkdir, asyncReadDir, asyncExists, asyncRemove, asyncUnlink} from './lib/utils/files';
import {getConfig} from './lib/utils/config';
import {initConfig} from './utils/config';
......
......@@ -105,7 +105,7 @@ export async function addBlacklistCriteria(type: number, value: any) {
if (type === 1001) {
if (blcList.some((blc: BLC) => !new RegExp(uuidRegexp).test(blc.value))) throw `Blacklist criteria value mismatch : type ${type} must have UUID values`;
}
if (((type > 1001 && type <= 1003) || (type > 0 && type < 999)) && blcvalues.some(isNumber)) throw `Blacklist criteria type mismatch : type ${type} must have a numeric value!`;
if (((type > 1001 && type <= 1003) || (type > 0 && type < 999)) && !blcvalues.some(isNumber)) throw `Blacklist criteria type mismatch : type ${type} must have a numeric value!`;
await addBLC(blcList);
return await generateBlacklist();
} catch(err) {
......