diff --git a/src/main/kotlin/dev/usbharu/hideout/controller/mastodon/MastodonStatusesApiContoller.kt b/src/main/kotlin/dev/usbharu/hideout/controller/mastodon/MastodonStatusesApiContoller.kt index 0d40471e..d5111577 100644 --- a/src/main/kotlin/dev/usbharu/hideout/controller/mastodon/MastodonStatusesApiContoller.kt +++ b/src/main/kotlin/dev/usbharu/hideout/controller/mastodon/MastodonStatusesApiContoller.kt @@ -22,5 +22,5 @@ class MastodonStatusesApiContoller(private val statusesApiService: StatusesApiSe statusesApiService.postStatus(statusesRequest, jwt.getClaim("uid").toLong()), HttpStatus.OK ) - } + } } diff --git a/src/main/kotlin/dev/usbharu/hideout/query/mastodon/StatusQueryServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/query/mastodon/StatusQueryServiceImpl.kt index 09d0c4a5..71d3e0e1 100644 --- a/src/main/kotlin/dev/usbharu/hideout/query/mastodon/StatusQueryServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/query/mastodon/StatusQueryServiceImpl.kt @@ -11,8 +11,8 @@ import java.time.Instant @Repository class StatusQueryServiceImpl : StatusQueryService { + @Suppress("LongMethod") override suspend fun findByPostIds(ids: List): List { - val pairs = Posts.innerJoin(Users, onColumn = { userId }, otherColumn = { id }) .select { Posts.id inList ids } .map { @@ -98,7 +98,5 @@ class StatusQueryServiceImpl : StatusQueryService { it } } - - } } diff --git a/src/main/kotlin/dev/usbharu/hideout/repository/MongoTimelineRepository.kt b/src/main/kotlin/dev/usbharu/hideout/repository/MongoTimelineRepository.kt index 96a69f36..3dcd35b1 100644 --- a/src/main/kotlin/dev/usbharu/hideout/repository/MongoTimelineRepository.kt +++ b/src/main/kotlin/dev/usbharu/hideout/repository/MongoTimelineRepository.kt @@ -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 { fun findByUserId(id: Long): List fun findByUserIdAndTimelineId(userId: Long, timelineId: Long): List diff --git a/src/main/kotlin/dev/usbharu/hideout/repository/MongoTimelineRepositoryWrapper.kt b/src/main/kotlin/dev/usbharu/hideout/repository/MongoTimelineRepositoryWrapper.kt index 98674637..d4908948 100644 --- a/src/main/kotlin/dev/usbharu/hideout/repository/MongoTimelineRepositoryWrapper.kt +++ b/src/main/kotlin/dev/usbharu/hideout/repository/MongoTimelineRepositoryWrapper.kt @@ -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 diff --git a/src/main/kotlin/dev/usbharu/hideout/service/ap/APNoteService.kt b/src/main/kotlin/dev/usbharu/hideout/service/ap/APNoteService.kt index c417a861..b4c260e1 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/ap/APNoteService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/ap/APNoteService.kt @@ -38,6 +38,7 @@ interface APNoteService { } @Service +@Suppress("LongParameterList") class APNoteServiceImpl( private val httpClient: HttpClient, private val jobQueueParentService: JobQueueParentService, diff --git a/src/main/kotlin/dev/usbharu/hideout/service/api/mastodon/TimelineApiService.kt b/src/main/kotlin/dev/usbharu/hideout/service/api/mastodon/TimelineApiService.kt index 677b65ba..2dfc1f24 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/api/mastodon/TimelineApiService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/api/mastodon/TimelineApiService.kt @@ -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 } - @Service class TimelineApiServiceImpl( private val generateTimelineService: GenerateTimelineService, diff --git a/src/main/kotlin/dev/usbharu/hideout/service/post/GenerateTimelineService.kt b/src/main/kotlin/dev/usbharu/hideout/service/post/GenerateTimelineService.kt index ea1a26a4..34f42678 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/post/GenerateTimelineService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/post/GenerateTimelineService.kt @@ -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 - } diff --git a/src/main/kotlin/dev/usbharu/hideout/service/post/MongoGenerateTimelineService.kt b/src/main/kotlin/dev/usbharu/hideout/service/post/MongoGenerateTimelineService.kt index 4c4a3808..fa5c9800 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/post/MongoGenerateTimelineService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/post/MongoGenerateTimelineService.kt @@ -23,8 +23,6 @@ class MongoGenerateTimelineService( sinceId: Long?, limit: Int ): List { - - val query = Query() if (forUserId != null) { val criteria = Criteria.where("userId").`is`(forUserId)