This commit is contained in:
2021-05-13 15:09:58 -07:00
parent 833c4570e1
commit 6eb0c611ee
2 changed files with 5 additions and 5 deletions

View File

@@ -39,6 +39,7 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-hooks-worker": "^1.0.0",
"request": "^2.88.2",
"sharp": "^0.28.1",
"stream-json": "^1.7.1",
"through2": "^4.0.2"

View File

@@ -4,6 +4,7 @@ import axios from "axios";
import stream from "stream";
import through2 from "through2";
import hyperquest from "hyperquest";
import request from "request";
import es from "event-stream";
import JSONStream from "JSONStream";
import oboe from "oboe";
@@ -12,17 +13,15 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
typeof req.body.extractionOptions === "object"
? req.body.extractionOptions
: {};
oboe({
request({
url: "http://localhost:3000/api/import/getComicCovers",
method: "POST",
json: true,
body: {
extractionOptions: req.body.extractionOptions,
walkedFolders: req.body.walkedFolders,
},
}).on("node", ".*", (data) => {
console.log(data);
res.write(JSON.stringify(data));
});
}).pipe(res);
});
router.route("/walkFolder").post(async (req: Request, res: Response) => {