update name of publishing checking fun

This commit is contained in:
InsanusMokrassar 2020-12-02 17:55:23 +06:00
parent bc974582d7
commit d077b539dd
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -29,10 +29,10 @@ interface PublishedPostsReadRepo : ReadCRUDRepo<PublishedPost, PublishedPostId>
reversed: Boolean = false reversed: Boolean = false
): PaginationResult<PublishedPostId> ): PaginationResult<PublishedPostId>
} }
suspend inline fun PostId.isPublished(lookIn: PublishedPostsReadRepo): Boolean { suspend inline fun PostId.publishedAtLeastOnce(lookIn: PublishedPostsReadRepo): Boolean {
return lookIn.getPostPublishing(this, FirstPagePagination(1)).results.isNotEmpty() return lookIn.getPostPublishing(this, FirstPagePagination(1)).results.isNotEmpty()
} }
suspend inline fun RegisteredPost.isPublished(lookIn: PublishedPostsReadRepo): Boolean { suspend inline fun RegisteredPost.publishedAtLeastOnce(lookIn: PublishedPostsReadRepo): Boolean {
return lookIn.getPostPublishing(id, FirstPagePagination(1)).results.isNotEmpty() return lookIn.getPostPublishing(id, FirstPagePagination(1)).results.isNotEmpty()
} }
interface PublishedPostsWriteRepo : WriteCRUDRepo<PublishedPost, PublishedPostId, RegisteredPost> interface PublishedPostsWriteRepo : WriteCRUDRepo<PublishedPost, PublishedPostId, RegisteredPost>