refactor: 不要なコードを削除

This commit is contained in:
usbharu 2023-08-10 20:08:56 +09:00
parent cff8640b86
commit ba743d3a36
2 changed files with 0 additions and 40 deletions

View File

@ -10,6 +10,5 @@ interface IPostRepository {
suspend fun findByUrl(url: String): Post?
suspend fun delete(id: Long)
suspend fun findByApId(id: String): Post?
}

View File

@ -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<Post> {
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<Post> {
TODO("Not yet implemented")
}
override suspend fun findByUserId(
idOrNull: Long,
since: Instant?,
until: Instant?,
minId: Long?,
maxId: Long?,
limit: Int?,
userId: Long?
): List<Post> {
TODO("Not yet implemented")
}
override suspend fun findByApId(id: String): Post? {
return query {
Posts.select { Posts.apId eq id }.singleOrNull()?.toPost()