fixes
This commit is contained in:
parent
5859c8bb44
commit
8efccf6672
@ -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(
|
||||
|
@ -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,
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user