feat Zip up the pack

master
ogomez-at-wiris 2022-02-25 02:44:44 +01:00
parent 27d4d3508e
commit 0b659db2c3
1 changed files with 2 additions and 7 deletions

View File

@ -17,7 +17,7 @@ export default class PackAPI {
public static downloadSinglePack = async (
req: Request,
res: Response,
res: any,
next: NextFunction
) => {
if (!req.query.name) {
@ -33,11 +33,6 @@ export default class PackAPI {
});
}
const zipFile = zip(foundPack.files);
response.pipe(zipFile);
return res.status(200).json({
message: "ok",
});
return res.zip(foundPack.files);
};
}