popular manga api done

This commit is contained in:
Aria Moradi
2020-12-25 19:29:48 +03:30
parent f20c51c558
commit c9c96e7d60
2 changed files with 24 additions and 5 deletions

View File

@@ -15,7 +15,8 @@ class Main {
val app = Javalin.create().start(4567)
app.before() { ctx ->
ctx.header("Access-Control-Allow-Origin", "*") // allow the client which is running on another port
// allow the client which is running on another port
ctx.header("Access-Control-Allow-Origin", "*")
}
app.get("/api/v1/extension/list") { ctx ->
@@ -36,7 +37,7 @@ class Main {
app.get("/api/v1/source/:source_id/popular") { ctx ->
val sourceId = ctx.pathParam("source_id")
// ctx.json(getPopularManga(sourceId))
ctx.json(getPopularManga(sourceId))
}
}
}