➿ Wired up the getComicCovers call
This commit is contained in:
@@ -24,7 +24,7 @@ export async function walkFolder(path: string): Promise<Array<IFolderData>> {
|
||||
}
|
||||
|
||||
export async function extractCoverFromComicBookArchive(
|
||||
options: IExtractionOptions,
|
||||
extractionOptions: IExtractionOptions,
|
||||
walkedFolders: Array<IFolderData>,
|
||||
): Promise<
|
||||
| IExtractedComicBookCoverFile
|
||||
@@ -35,7 +35,7 @@ export async function extractCoverFromComicBookArchive(
|
||||
url: FS_API_BASE_URI + "getComicCovers",
|
||||
method: "POST",
|
||||
data: {
|
||||
options,
|
||||
extractionOptions,
|
||||
walkedFolders,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -20,11 +20,12 @@ export const greet = async (
|
||||
};
|
||||
|
||||
const fileObjects = await walkFolder("./comics");
|
||||
return await extractCoverFromComicBookArchive(
|
||||
const fo = await extractCoverFromComicBookArchive(
|
||||
{
|
||||
...targetOptions,
|
||||
paginationOptions: pagingConfig,
|
||||
},
|
||||
fileObjects,
|
||||
);
|
||||
return JSON.stringify(fo);
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
|
||||
req.body.extractionOptions,
|
||||
req.body.walkedFolders,
|
||||
);
|
||||
return res.json({ foo });
|
||||
return res.json(foo);
|
||||
// const extractedData = await extractArchive(req.body);
|
||||
// if (
|
||||
// _.isArray(extractedData) &&
|
||||
|
||||
Reference in New Issue
Block a user