add ability to delete downloaded chapters

This commit is contained in:
Aria Moradi
2021-09-17 01:29:42 +04:30
parent 4e72a3886f
commit 6bc19af041
5 changed files with 38 additions and 7 deletions

View File

@@ -124,6 +124,16 @@ object MangaController {
ctx.status(200)
}
/** delete a downloaded chapter */
fun chapterDelete(ctx: Context) {
val chapterIndex = ctx.pathParam("chapterIndex").toInt()
val mangaId = ctx.pathParam("mangaId").toInt()
Chapter.deleteChapter(mangaId, chapterIndex)
ctx.status(200)
}
/** used to modify a chapter's meta parameters */
fun chapterMeta(ctx: Context) {
val chapterIndex = ctx.pathParam("chapterIndex").toInt()