mirror of https://github.com/usbharu/Hideout.git
style: スタイルを調整
This commit is contained in:
parent
bbdfb59bb0
commit
a21a4d7d96
|
@ -22,5 +22,5 @@ class MastodonStatusesApiContoller(private val statusesApiService: StatusesApiSe
|
|||
statusesApiService.postStatus(statusesRequest, jwt.getClaim<String>("uid").toLong()),
|
||||
HttpStatus.OK
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -38,6 +38,7 @@ interface APNoteService {
|
|||
}
|
||||
|
||||
@Service
|
||||
@Suppress("LongParameterList")
|
||||
class APNoteServiceImpl(
|
||||
private val httpClient: HttpClient,
|
||||
private val jobQueueParentService: JobQueueParentService,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue