mirror of
https://github.com/metrico/qryn.git
synced 2025-03-14 10:07:18 +00:00
fix
This commit is contained in:
@ -52,7 +52,7 @@ async function handle (req, res) {
|
|||||||
}
|
}
|
||||||
await Promise.all(promises)
|
await Promise.all(promises)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await asyncLogError(error)
|
await asyncLogError(error, req.log)
|
||||||
res.status(500).send({ error: 'Internal Server Error' })
|
res.status(500).send({ error: 'Internal Server Error' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ module.exports = class Builder {
|
|||||||
for (const term of self.terms) {
|
for (const term of self.terms) {
|
||||||
const sqlTerm = self.getTerm(term)
|
const sqlTerm = self.getTerm(term)
|
||||||
self.sqlConditions.push(sqlTerm)
|
self.sqlConditions.push(sqlTerm)
|
||||||
if (!term.Child('label_name').value.match(/^(\.|span\.|resource\.|name)/)) {
|
if (!term.Child('label_name').value.match(/^(\.|span\.|resource\.|name|status)/)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
self.where.push(sqlTerm)
|
self.where.push(sqlTerm)
|
||||||
@ -181,6 +181,9 @@ module.exports = class Builder {
|
|||||||
case 'name':
|
case 'name':
|
||||||
key = 'name'
|
key = 'name'
|
||||||
break
|
break
|
||||||
|
case 'status':
|
||||||
|
key = 'status'
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
throw new Error(`unsupported attribute ${key}`)
|
throw new Error(`unsupported attribute ${key}`)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user