🔫 Refactoring extractArchive to use Promise.all

This commit is contained in:
2021-05-05 08:36:27 -07:00
parent e2bdb6e190
commit dcec8f8bfc
3 changed files with 34 additions and 26 deletions

View File

@@ -9,9 +9,11 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
typeof req.body.extractionOptions === "object"
? req.body.extractionOptions
: {};
console.log(req.body)
// const foo = await getCovers(req.body, req.bod);
return res.json({ foo: "madi" });
const foo = await getCovers(
req.body.extractionOptions,
req.body.walkedFolders,
);
return res.json({ foo });
// const extractedData = await extractArchive(req.body);
// if (
// _.isArray(extractedData) &&