Minimum the host branch (#751)

* minimum dist branch

* force command

* clear multisrc by npm script

* refactor: action name

* fix: handle plugin error

* fix: handle plugin error
This commit is contained in:
nyagami
2024-02-06 23:25:23 +07:00
committed by GitHub
parent e1207c172a
commit d1e1404205
7 changed files with 44 additions and 59 deletions
+10 -10
View File
@@ -71,8 +71,8 @@ app.post("/popularNovels/", async (req, res) => {
filters,
});
res.json(novels);
} catch (err) {
res.json({ error: err });
} catch (err: unknown) {
res.json({ error: String(err) });
}
});
app.post("/searchNovels/", async (req, res) => {
@@ -84,8 +84,8 @@ app.post("/searchNovels/", async (req, res) => {
req.body["searchTerm"]
);
res.json(novels);
} catch (err) {
res.json({ error: err });
} catch (err: unknown) {
res.json({ error: String(err) });
}
});
app.post("/parseNovelAndChapters/", async (req, res) => {
@@ -95,8 +95,8 @@ app.post("/parseNovelAndChapters/", async (req, res) => {
req.body["novelUrl"]
);
res.json(sourceNovel);
} catch (err) {
res.json({ error: err });
} catch (err: unknown) {
res.json({ error: String(err) });
}
});
app.post("/parseChapter/", async (req, res) => {
@@ -106,8 +106,8 @@ app.post("/parseChapter/", async (req, res) => {
req.body["chapterUrl"]
);
res.send(chapterText);
} catch (err) {
res.json({ error: err });
} catch (err: unknown) {
res.json({ error: String(err) });
}
});
app.post("/fetchImage/", async (req, res) => {
@@ -117,8 +117,8 @@ app.post("/fetchImage/", async (req, res) => {
req.body["url"]
);
res.send(base64);
} catch (err) {
res.json({ error: err });
} catch (err: unknown) {
res.json({ error: String(err) });
}
});