Add route for get all versions of one article

This commit is contained in:
2019-09-05 17:15:54 +02:00
parent 6423491be3
commit 742927a590
4 changed files with 51 additions and 3 deletions

View File

@@ -16,6 +16,12 @@ class Article(override var requester: Requester) : RepositoryI<ArticleEntity> {
return function.selectOne("id" to id)
}
fun findVerionsByVersionsId(page: Int = 1, limit: Int = 50, versionId: UUID): Paginated<ArticleEntity> {
return requester
.getFunction("find_articles_versions_by_version_id")
.select(page, limit, "version_id" to versionId)
}
fun find(
page: Int = 1,
limit: Int = 50,