🪛 Fixes to the wiring between extract archive and UI

This commit is contained in:
2021-05-04 09:44:05 -07:00
parent 32c2470fed
commit 88921d9676
3 changed files with 15 additions and 4 deletions

View File

@@ -7,8 +7,13 @@ export interface IExtractionOptions {
extractTarget: string;
sourceFolder: string;
targetExtractionFolder: string;
paginationOptions: IPaginationOptions;
}
export interface IPaginationOptions {
pageLimit: number;
page: number;
}
export interface IComicVineSearchMatch {
description: string;
id: number;

View File

@@ -21,7 +21,8 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
const pageCount = Math.ceil(
extractedData.length / req.body.paginationOptions.pageLimit,
);
res.json({
return res.json({
object: "list",
has_more: paginate.hasNextPages(req)(pageCount),
pageCount,
@@ -40,7 +41,7 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
// const foo = await unzipOne(options);
// const foo = await unzip("asd");
// const foo = explodePath("Chapter Three/HELLBOY - The Chained Coffin - 069.jpg");
res.json({
return res.json({
extractedData,
});
});