style: スタイルを調整

This commit is contained in:
usbharu 2023-09-30 11:19:06 +09:00
parent bbdfb59bb0
commit a21a4d7d96
8 changed files with 7 additions and 8 deletions

View File

@ -22,5 +22,5 @@ class MastodonStatusesApiContoller(private val statusesApiService: StatusesApiSe
statusesApiService.postStatus(statusesRequest, jwt.getClaim<String>("uid").toLong()),
HttpStatus.OK
)
}
}
}

View File

@ -11,8 +11,8 @@ import java.time.Instant
@Repository
class StatusQueryServiceImpl : StatusQueryService {
@Suppress("LongMethod")
override suspend fun findByPostIds(ids: List<Long>): List<Status> {
val pairs = Posts.innerJoin(Users, onColumn = { userId }, otherColumn = { id })
.select { Posts.id inList ids }
.map {
@ -98,7 +98,5 @@ class StatusQueryServiceImpl : StatusQueryService {
it
}
}
}
}

View File

@ -4,6 +4,7 @@ import dev.usbharu.hideout.domain.model.hideout.entity.Timeline
import org.springframework.data.domain.Pageable
import org.springframework.data.mongodb.repository.MongoRepository
@Suppress("LongParameterList")
interface MongoTimelineRepository : MongoRepository<Timeline, Long> {
fun findByUserId(id: Long): List<Timeline>
fun findByUserIdAndTimelineId(userId: Long, timelineId: Long): List<Timeline>

View File

@ -7,6 +7,7 @@ import kotlinx.coroutines.withContext
import org.springframework.stereotype.Repository
@Repository
@Suppress("InjectDispatcher")
class MongoTimelineRepositoryWrapper(
private val mongoTimelineRepository: MongoTimelineRepository,
private val idGenerateService: IdGenerateService

View File

@ -38,6 +38,7 @@ interface APNoteService {
}
@Service
@Suppress("LongParameterList")
class APNoteServiceImpl(
private val httpClient: HttpClient,
private val jobQueueParentService: JobQueueParentService,

View File

@ -5,6 +5,7 @@ import dev.usbharu.hideout.service.core.Transaction
import dev.usbharu.hideout.service.post.GenerateTimelineService
import org.springframework.stereotype.Service
@Suppress("LongParameterList")
interface TimelineApiService {
suspend fun publicTimeline(
localOnly: Boolean = false,
@ -25,7 +26,6 @@ interface TimelineApiService {
): List<Status>
}
@Service
class TimelineApiServiceImpl(
private val generateTimelineService: GenerateTimelineService,

View File

@ -4,6 +4,7 @@ import dev.usbharu.hideout.domain.mastodon.model.generated.Status
import org.springframework.stereotype.Service
@Service
@Suppress("LongParameterList")
interface GenerateTimelineService {
suspend fun getTimeline(
forUserId: Long? = null,
@ -14,5 +15,4 @@ interface GenerateTimelineService {
sinceId: Long? = null,
limit: Int = 20
): List<Status>
}

View File

@ -23,8 +23,6 @@ class MongoGenerateTimelineService(
sinceId: Long?,
limit: Int
): List<Status> {
val query = Query()
if (forUserId != null) {
val criteria = Criteria.where("userId").`is`(forUserId)