add build workflow

This commit is contained in:
Aria Moradi
2021-01-21 14:15:05 +03:30
parent c537c1bf29
commit 34a7c24e0b
5 changed files with 173 additions and 2 deletions

View File

@@ -94,9 +94,30 @@ class Main {
val mangaId = ctx.pathParam("mangaId").toInt()
ctx.json(getPages(chapterId, mangaId))
}
// global search
app.get("/api/v1/search/:searchTerm") { ctx ->
val searchTerm = ctx.pathParam("searchTerm")
ctx.json(sourceGlobalSearch(searchTerm))
}
// single source search
app.get("/api/v1/source/:sourceId/search/:searchTerm") { ctx ->
val sourceId = ctx.pathParam("sourceId").toLong()
val searchTerm = ctx.pathParam("searchTerm")
ctx.json(sourceSearch(sourceId, searchTerm))
}
// source filter list
app.get("/api/v1/source/:sourceId/filters/") { ctx ->
val sourceId = ctx.pathParam("sourceId").toLong()
ctx.json(sourceFilters(sourceId))
}
}
}
}