diff --git a/src/main/kotlin/dev/usbharu/hideout/repository/IPostRepository.kt b/src/main/kotlin/dev/usbharu/hideout/repository/IPostRepository.kt index 9b331370..4e135f70 100644 --- a/src/main/kotlin/dev/usbharu/hideout/repository/IPostRepository.kt +++ b/src/main/kotlin/dev/usbharu/hideout/repository/IPostRepository.kt @@ -10,6 +10,5 @@ interface IPostRepository { suspend fun findByUrl(url: String): Post? suspend fun delete(id: Long) - suspend fun findByApId(id: String): Post? } diff --git a/src/main/kotlin/dev/usbharu/hideout/repository/PostRepositoryImpl.kt b/src/main/kotlin/dev/usbharu/hideout/repository/PostRepositoryImpl.kt index 12156818..c8a327d9 100644 --- a/src/main/kotlin/dev/usbharu/hideout/repository/PostRepositoryImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/repository/PostRepositoryImpl.kt @@ -9,7 +9,6 @@ import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction import org.jetbrains.exposed.sql.transactions.transaction import org.koin.core.annotation.Single -import java.time.Instant @Single class PostRepositoryImpl(database: Database, private val idGenerateService: IdGenerateService) : IPostRepository { @@ -80,44 +79,6 @@ class PostRepositoryImpl(database: Database, private val idGenerateService: IdGe } } - override suspend fun findAll( - since: Instant?, - until: Instant?, - minId: Long?, - maxId: Long?, - limit: Int?, - userId: Long? - ): List { - return query { - Posts.select { Posts.visibility eq Visibility.PUBLIC.ordinal }.map { it.toPost() } - } - } - - override suspend fun findByUserNameAndDomain( - username: String, - s: String, - since: Instant?, - until: Instant?, - minId: Long?, - maxId: Long?, - limit: Int?, - userId: Long? - ): List { - TODO("Not yet implemented") - } - - override suspend fun findByUserId( - idOrNull: Long, - since: Instant?, - until: Instant?, - minId: Long?, - maxId: Long?, - limit: Int?, - userId: Long? - ): List { - TODO("Not yet implemented") - } - override suspend fun findByApId(id: String): Post? { return query { Posts.select { Posts.apId eq id }.singleOrNull()?.toPost()