hotfix for InMemoryPostsAPI

This commit is contained in:
InsanusMokrassar 2019-11-03 00:36:07 +06:00
parent 4760617808
commit 033acc818d

View File

@ -25,7 +25,7 @@ class InMemoryPostsAPI(
post.content.any { it.id == id } post.content.any { it.id == id }
} }
override suspend fun getPostsByDates(from: DateTime?, to: DateTime?): List<RegisteredPost> = posts.values.filter { override suspend fun getPostsByDates(from: DateTime?, to: DateTime?): List<RegisteredPost> = posts.values.filter {
from ?.let { _ -> it.creationDate > from } ?: true && to ?.let { _ -> it.creationDate < to } ?: true from ?.let { _ -> it.creationDate >= from } ?: true && to ?.let { _ -> it.creationDate <= to } ?: true
} }
override suspend fun getPostsByPagination( override suspend fun getPostsByPagination(
pagination: Pagination pagination: Pagination
@ -39,6 +39,4 @@ class InMemoryPostsAPI(
it it
) )
} }
} }