🔧 Adding a full extraction endpoint
This commit is contained in:
@@ -47,6 +47,7 @@ import {
|
||||
walkFolder,
|
||||
getSizeOfDirectory,
|
||||
} from "../utils/file.utils";
|
||||
import { uncompressEntireArchive } from "../utils/uncompression.utils";
|
||||
import { convertXMLToJSON } from "../utils/xml.utils";
|
||||
import {
|
||||
IExtractComicBookCoverErrorResponse,
|
||||
@@ -88,6 +89,13 @@ export default class ImportService extends Service {
|
||||
return convertXMLToJSON("lagos");
|
||||
},
|
||||
},
|
||||
uncompressFullArchive : {
|
||||
rest: "POST /uncompressFullArchive",
|
||||
params: {},
|
||||
handler: async (ctx: Context<{filePath: string}>) => {
|
||||
return await uncompressEntireArchive(ctx.params.filePath);
|
||||
}
|
||||
},
|
||||
newImport: {
|
||||
rest: "POST /newImport",
|
||||
params: {},
|
||||
@@ -323,7 +331,7 @@ export default class ImportService extends Service {
|
||||
) {
|
||||
return await Comic.paginate(ctx.params.predicate, {
|
||||
...ctx.params.paginationOptions,
|
||||
allowDiskUse: true,
|
||||
// allowDiskUse: true,
|
||||
});
|
||||
},
|
||||
},
|
||||
@@ -537,7 +545,7 @@ export default class ImportService extends Service {
|
||||
{ $sort: { count: -1 } },
|
||||
{ $limit: 1 },
|
||||
],
|
||||
mostPopulatCharacter: [],
|
||||
// mostPopulatCharacter: [],
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user