fix request debug-logging 🐛

This commit is contained in:
Jannis R 2021-12-09 18:58:31 +01:00
parent 2fd06941b5
commit 9c10a1765f
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -75,7 +75,6 @@ const request = (ctx, userAgent, reqData) => {
'ver', // HAFAS protocol version
'auth', // static authentication
]))
if (DEBUG) console.error(JSON.stringify(body))
const req = profile.transformReq(ctx, {
agent: getAgent(),
@ -92,6 +91,7 @@ const request = (ctx, userAgent, reqData) => {
redirect: 'follow',
query: {}
})
if (DEBUG) console.error(req.body)
if (profile.addChecksum || profile.addMicMac) {
if (!Buffer.isBuffer(profile.salt) && 'string' !== typeof profile.salt) {