checksum fail message undefined, app.use() duplicate
This commit is contained in:
parent
20e71f617b
commit
3372ca1954
|
@ -77,7 +77,6 @@ expressWs(app);
|
||||||
|
|
||||||
const api_v2 = require('./api/v2');
|
const api_v2 = require('./api/v2');
|
||||||
app.use('/api/v2', api_v2);
|
app.use('/api/v2', api_v2);
|
||||||
app.use('/api/v2', api_v2);
|
|
||||||
|
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
return res.status(404).send({ message: 'Not Found' });
|
return res.status(404).send({ message: 'Not Found' });
|
||||||
|
|
|
@ -80,7 +80,9 @@ class Package {
|
||||||
const cs = hash.digest('hex');
|
const cs = hash.digest('hex');
|
||||||
|
|
||||||
if (cs !== this.checksum) {
|
if (cs !== this.checksum) {
|
||||||
throw new Error(`Checksum miss-match want: ${val} got: ${cs}`);
|
throw new Error(
|
||||||
|
`Checksum miss-match want: ${this.checksum} got: ${cs}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|
Loading…
Reference in New Issue