pages api done

This commit is contained in:
Aria Moradi
2021-01-20 00:04:12 +03:30
parent 21c0ea4e90
commit 5d9173d3f7
12 changed files with 128 additions and 33 deletions

View File

@@ -76,12 +76,15 @@ class Main {
ctx.json(getManga(mangaId))
}
app.get("/api/v1/chapters/:mangaId/") { ctx ->
app.get("/api/v1/manga/:mangaId/chapters") { ctx ->
val mangaId = ctx.pathParam("mangaId").toInt()
ctx.json(getChapterList(mangaId))
}
app.get("/api/v1/chapter/:chapterId") { ctx ->
val chapterId = ctx.pathParam("chapterId").toInt()
ctx.json(getPages(chapterId))
}
}