mirror of
https://github.com/mempool/mempool.git
synced 2025-01-17 18:52:34 +01:00
Upgraded typescript and tslint version and fixed query type error.
This commit is contained in:
parent
adcec33fb9
commit
fa88bd7057
1262
backend/package-lock.json
generated
Normal file
1262
backend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@
|
||||
"@types/express": "^4.17.2",
|
||||
"@types/request": "^2.48.2",
|
||||
"@types/ws": "^6.0.4",
|
||||
"tslint": "^5.11.0",
|
||||
"typescript": "^3.6.4"
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~3.9.7"
|
||||
}
|
||||
}
|
||||
|
@ -109,14 +109,15 @@ class Routes {
|
||||
|
||||
public getBisqTransactions(req: Request, res: Response) {
|
||||
const types: string[] = [];
|
||||
if (req.query.types && !Array.isArray(req.query.types)) {
|
||||
req.query.types = req.query.types || [];
|
||||
if (!Array.isArray(req.query.types)) {
|
||||
res.status(500).send('Types is not an array');
|
||||
return;
|
||||
} else {
|
||||
for (const _type in req.query.types) {
|
||||
if (typeof req.query.types[_type] === 'string') {
|
||||
types.push(req.query.types[_type].toString());
|
||||
}
|
||||
}
|
||||
|
||||
for (const _type in req.query.types) {
|
||||
if (typeof req.query.types[_type] === 'string') {
|
||||
types.push(req.query.types[_type].toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user