mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
Manga database classes, api url change, fix source id
This commit is contained in:
@@ -20,21 +20,32 @@ class Main {
|
||||
ctx.header("Access-Control-Allow-Origin", "*") // allow the client which is running on another port
|
||||
}
|
||||
|
||||
app.get("/api/v1/extensions") { ctx ->
|
||||
app.get("/api/v1/extension/list") { ctx ->
|
||||
ctx.json(getExtensionList())
|
||||
}
|
||||
|
||||
|
||||
app.get("/api/v1/extensions/install/:apkName") { ctx ->
|
||||
app.get("/api/v1/extension/install/:apkName") { ctx ->
|
||||
val apkName = ctx.pathParam("apkName")
|
||||
println(apkName)
|
||||
ctx.status(
|
||||
installAPK(apkName)
|
||||
)
|
||||
}
|
||||
app.get("/api/v1/sources/") { ctx ->
|
||||
app.get("/api/v1/source/list") { ctx ->
|
||||
ctx.json(getSourceList())
|
||||
}
|
||||
|
||||
app.get("/api/v1/source/:source_id/popular") { ctx ->
|
||||
val sourceId = ctx.pathParam("source_id")
|
||||
ctx.json(getPopularManga(sourceId))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun getPopularManga(sourceId: String): List<Any> {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user