This commit is contained in:
InsanusMokrassar 2019-11-25 01:15:31 +06:00
parent 5859c8bb44
commit 8efccf6672
3 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ interface ReadPostsAPI {
/**
* @return all posts by pages basing on their creation date
*/
suspend fun getPostsByPagination(pagination: Pagination): PaginationResult<out RegisteredPost>
suspend fun getPostsByPagination(pagination: Pagination): PaginationResult<RegisteredPost>
}
suspend fun ReadPostsAPI.getPostsByCreatingDates(

View File

@ -76,7 +76,7 @@ class InMemoryPostsAPI(
override suspend fun getPostsByPagination(
pagination: Pagination
): PaginationResult<out RegisteredPost> = pagination.createResult(
): PaginationResult<RegisteredPost> = pagination.createResult(
commonObjectsNumber = posts.size,
results = sortedByDatePosts.subList(
pagination.firstIndex,

View File

@ -158,7 +158,7 @@ private class PostsAPIDatabaseTable(
}
}
override suspend fun getPostsByPagination(pagination: Pagination): PaginationResult<out RegisteredPost> {
override suspend fun getPostsByPagination(pagination: Pagination): PaginationResult<RegisteredPost> {
return transaction {
val posts = selectAll().limit(pagination.size, pagination.firstIndex).orderBy(creationDateColumn).map {
it.toRegisteredPost()