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