mirror of
https://github.com/metrico/qryn.git
synced 2025-04-08 05:42:57 +00:00
#fix: correct buffer send; add node 20 to the ci
This commit is contained in:
2
.github/workflows/node-clickhouse.js.yml
vendored
2
.github/workflows/node-clickhouse.js.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18, 16.x]
|
||||
node-version: [18, 16.x, 20]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
|
@ -26,6 +26,7 @@ const wrapper = (handler, parsers) => {
|
||||
let status = 200
|
||||
let reqBody = ''
|
||||
let headers = {}
|
||||
log.info(`${ctx.url}`)
|
||||
|
||||
const stream = new BodyStream()
|
||||
setTimeout(async () => {
|
||||
@ -115,7 +116,7 @@ const wrapper = (handler, parsers) => {
|
||||
if (result) {
|
||||
response = result
|
||||
}
|
||||
if (response instanceof Object && typeof response !== 'string') {
|
||||
if (response instanceof Object && typeof response !== 'string' && !Buffer.isBuffer(response)) {
|
||||
response = JSON.stringify(response)
|
||||
}
|
||||
return new Response(response, { status: status, headers: headers })
|
||||
|
Reference in New Issue
Block a user