Skip to content
Snippets Groups Projects
Commit eeacc257 authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: do not cache downloadkgfiles endpoint

parent 1fb21896
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ datasetsRouter.get('/kgInfo', checkKgQuery, cacheMaxAge24Hr, async (req, res) =>
stream.pipe(res)
})
datasetsRouter.get('/downloadKgFiles', checkKgQuery, cacheMaxAge24Hr, async (req, res) => {
datasetsRouter.get('/downloadKgFiles', checkKgQuery, async (req, res) => {
const { kgId } = req.query
const { user } = req
try {
......
......@@ -406,12 +406,11 @@ const getDatasetFileAsZip = async ({ user, kgId } = {}) => {
}
const result = await getDatasetFromId({ user, kgId })
const { option } = await getUserKGRequestParam({ user })
const { files } = result
const zip = archiver('zip')
for (let file of files) {
const { name, absolutePath } = file
zip.append(request(absolutePath, option), { name })
zip.append(request(absolutePath), { name })
}
zip.finalize()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment