single source search done

This commit is contained in:
Aria Moradi
2021-01-22 18:07:31 +03:30
parent 6401b946b6
commit 7d1c63e181
10 changed files with 106 additions and 65 deletions

View File

@@ -119,10 +119,11 @@ class Main {
}
// single source search
app.get("/api/v1/source/:sourceId/search/:searchTerm") { ctx ->
app.get("/api/v1/source/:sourceId/search/:searchTerm/:pageNum") { ctx ->
val sourceId = ctx.pathParam("sourceId").toLong()
val searchTerm = ctx.pathParam("searchTerm")
ctx.json(sourceSearch(sourceId, searchTerm))
val pageNum = ctx.pathParam("pageNum").toInt()
ctx.json(sourceSearch(sourceId, searchTerm, pageNum))
}
// source filter list