refactor: easier comparables, fix audits (#614)

This commit is contained in:
Jef LeCompte
2020-10-29 16:27:09 -04:00
committed by GitHub
parent e5b0d7983b
commit 13edbf311e
9 changed files with 12636 additions and 4213 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
import {IncomingMessage, Server, ServerResponse, createServer} from 'http';
import {config, setConfig} from '../config';
import {createReadStream, readdir} from 'fs';
import {getAllBrands, getAllModels, getAllSeries, storeList} from '../store/model';
import {getAllBrands, getAllModels, getAllSeries, storeList, updateStores} from '../store/model';
import {join, normalize} from 'path';
const approot = join(__dirname, '../../');
@@ -75,6 +75,7 @@ function handleAPI(request: IncomingMessage, response: ServerResponse, urlCompon
// We ignore errors, client just sent wrong data...
try {
setConfig(JSON.parse(data.join('')));
updateStores();
} catch { }
sendConfig(response);