🐳 Refactoring
This commit is contained in:
@@ -4,26 +4,22 @@ import { IExtractionOptions } from "../../interfaces/folder.interface";
|
||||
import { Request, Response } from "express";
|
||||
import _ from "lodash";
|
||||
import H from "highland";
|
||||
import intoStream from "into-stream";
|
||||
const ndjson = require("ndjson");
|
||||
import axios from "axios";
|
||||
import oboe from "oboe";
|
||||
|
||||
router.route("/getComicCovers").post(async (req: Request, res: Response) => {
|
||||
typeof req.body.extractionOptions === "object"
|
||||
? req.body.extractionOptions
|
||||
: {};
|
||||
const foo = await axios
|
||||
.request({
|
||||
url: "http://localhost:3000/api/import/getComicCovers",
|
||||
method: "POST",
|
||||
data: {
|
||||
extractionOptions: req.body.extractionOptions,
|
||||
walkedFolders: req.body.walkedFolders,
|
||||
},
|
||||
})
|
||||
.then((data) => data.data)
|
||||
.catch((error) => error);
|
||||
res.json(foo);
|
||||
oboe({
|
||||
url: "http://localhost:3853/api/import/getComicCovers",
|
||||
method: "POST",
|
||||
data: {
|
||||
extractionOptions: req.body.extractionOptions,
|
||||
walkedFolders: req.body.walkedFolders,
|
||||
}
|
||||
})
|
||||
res.json(foo);
|
||||
});
|
||||
|
||||
router.route("/walkFolder").post(async (req: Request, res: Response) => {
|
||||
|
||||
Reference in New Issue
Block a user