Commented out bad code

This commit is contained in:
Saud Fatayerji 2023-11-12 20:58:40 +03:00
parent 8018947353
commit c7dd18695d
3 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
import express, { Request, Response } from 'express';
import workflow from './workflow-controller';
//import workflow from './workflow-controller';
import operations from './operations-controller';
const router = express.Router();
@ -11,6 +11,6 @@ router.get("/", (req: Request, res: Response) => {
});
router.use("/operations", operations);
router.use("/workflow", workflow);
//router.use("/workflow", workflow);
export default router;

View File

@ -5,13 +5,13 @@ import Archiver from 'archiver';
import multer from 'multer'
const upload = multer();
import Operations from "../../utils/pdf-operations";
import { traverseOperations } from "@stirling-pdf/shared-operations/workflow/traverseOperations.js";
//import Operations from "../../utils/pdf-operations";
//import { traverseOperations } from "@stirling-pdf/shared-operations/workflow/traverseOperations.js";
const activeWorkflows: any = {};
const router = express.Router();
/*
router.post("/:workflowUuid?", [
upload.any(),
async (req: Request, res: Response) => {
@ -159,7 +159,7 @@ router.get("/result/:workflowUuid", (req: Request, res: Response) => {
* If workflow isn't done return error
* Send file, TODO: if there are multiple outputs return as zip
* If download is done, delete results / allow deletion within the next 5-60 mins
*/
*
const workflow = activeWorkflows[req.params.workflowUuid];
if(!workflow.finished) {
res.status(202).json({ message: "Workflow hasn't finished yet. Check progress or connect to progress-steam to get notified when its done." });
@ -227,5 +227,5 @@ function downloadHandler(res: Response, pdfResults: any) {
readStream.pipe(res);
}
}
*/
export default router;

View File

@ -2,13 +2,13 @@
import SharedOperations from "@stirling-pdf/shared-operations";
// Import injected libraries here!
import * as pdfcpuWrapper from "@stirling-pdf/shared-operations/wasm/pdfcpu/pdfcpu-wrapper-node.js";
//import * as pdfcpuWrapper from "@stirling-pdf/shared-operations/wasm/pdfcpu/pdfcpu-wrapper-node.js";
async function impose(snapshot: any, nup: number, format: string) {
/*async function impose(snapshot: any, nup: number, format: string) {
return SharedOperations.impose(snapshot, nup, format, pdfcpuWrapper);
}
}*/
export default {
...SharedOperations,
impose,
//impose,
}