feat Zip up the pack
parent
27d4d3508e
commit
0b659db2c3
|
@ -17,7 +17,7 @@ export default class PackAPI {
|
||||||
|
|
||||||
public static downloadSinglePack = async (
|
public static downloadSinglePack = async (
|
||||||
req: Request,
|
req: Request,
|
||||||
res: Response,
|
res: any,
|
||||||
next: NextFunction
|
next: NextFunction
|
||||||
) => {
|
) => {
|
||||||
if (!req.query.name) {
|
if (!req.query.name) {
|
||||||
|
@ -33,11 +33,6 @@ export default class PackAPI {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const zipFile = zip(foundPack.files);
|
return res.zip(foundPack.files);
|
||||||
response.pipe(zipFile);
|
|
||||||
|
|
||||||
return res.status(200).json({
|
|
||||||
message: "ok",
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue