This commit is contained in:
parent
d3c6afa590
commit
3cf8f296cd
@ -504,13 +504,14 @@ module.exports = (app, client) => {
|
||||
'Content-Type': 'application/x-gzip',
|
||||
'Content-disposition': 'attachment; filename=fediblock-index.json.gz'
|
||||
})
|
||||
(await client.search({
|
||||
index: constant.index,
|
||||
size: 9999,
|
||||
query: {
|
||||
match_all: {}
|
||||
}
|
||||
}, { asStream: true })).pipe(zlib.createGzip()).pipe(res, { end: true })
|
||||
const result = await client.search({
|
||||
index: constant.index,
|
||||
size: 9999,
|
||||
query: {
|
||||
match_all: {}
|
||||
}
|
||||
}, { asStream: true })
|
||||
result.pipe(zlib.createGzip()).pipe(res, { end: true })
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
res.status(404).end()
|
||||
|
Loading…
Reference in New Issue
Block a user