🪢 Rewired the download -> import to lib workflow

This commit is contained in:
2022-05-11 10:57:30 -07:00
parent cf75e8f9ff
commit 0b195d6ff3
4 changed files with 9 additions and 20 deletions

View File

@@ -31,7 +31,7 @@ export default class OpdsService extends Service {
},
hooks: {},
actions: {
opds: {
serve: {
rest: "POST /serve",
handler: async (ctx) => {
return buildAsync(
@@ -137,18 +137,4 @@ export default class OpdsService extends Service {
)
);
}
}
// router.use("/file/*", async (req, res) => {
// const file: string = req.params[0];
// const ext = extname(file);
// if ([".cbr", ".cbz", ".cb7", ".cba", ".cbt"].includes(ext)) {
// const content = await fs.readFile(join(path_of_books, file));
// const mime = lookup(ext) || "application/octet-stream";
// res.set("Content-Type", mime);
// return responseStream(res, content);
// }
// res.status(404).end(`'${file}' not exists`);
// });
}