Skip to content

Commit

Permalink
houmo 正文
Browse files Browse the repository at this point in the history
  • Loading branch information
Liloupar committed Dec 25, 2019
1 parent 93e755a commit e754050
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/org/lightink/reader/api/HoumoApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ class HoumoApi : BaseApi {
}

private fun getContent(context: RoutingContext) {
val bookSource = context.bodyAsJson.getJsonObject("bookSource").toString()
val book = context.bodyAsJson.getJsonObject("book").mapTo(Book::class.java)
val bookChapter = context.bodyAsJson.getJsonObject("bookChapter").mapTo(BookChapter::class.java)
val bookSourceCode = context.request().params().get("bookSource").toString()
val book = JsonObject(context.request().params().get("book")).mapTo(Book::class.java)
val bookChapter = JsonObject(context.request().params().get("bookChapter")).mapTo(BookChapter::class.java)
val bookSource = YueduSchedule.Shuyuan.get(bookSourceCode)

WebBook(bookSource).getContent(book, bookChapter)
.onSuccess {
context.success(it)
Expand Down

0 comments on commit e754050

Please sign in to comment.