diff --git a/server-node/src/routes/api/api-controller.ts b/server-node/src/routes/api/api-controller.ts index e5a820a3..9524802e 100644 --- a/server-node/src/routes/api/api-controller.ts +++ b/server-node/src/routes/api/api-controller.ts @@ -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; \ No newline at end of file diff --git a/server-node/src/routes/api/workflow-controller.ts b/server-node/src/routes/api/workflow-controller.ts index 386796b9..f29f5dba 100644 --- a/server-node/src/routes/api/workflow-controller.ts +++ b/server-node/src/routes/api/workflow-controller.ts @@ -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; \ No newline at end of file diff --git a/server-node/src/utils/pdf-operations.ts b/server-node/src/utils/pdf-operations.ts index ea9f3773..28831b8e 100644 --- a/server-node/src/utils/pdf-operations.ts +++ b/server-node/src/utils/pdf-operations.ts @@ -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, }