style: fix lint (CI)

This commit is contained in:
usbharu 2024-08-17 10:52:33 +00:00 committed by github-actions[bot]
parent 3105c6cf65
commit 29ff1269ce
16 changed files with 27 additions and 30 deletions

View File

@ -18,13 +18,15 @@ import org.springframework.stereotype.Component
class UserRegisterHomeTimelineApplicationService( class UserRegisterHomeTimelineApplicationService(
private val userDetailRepository: UserDetailRepository, private val userDetailRepository: UserDetailRepository,
private val timelineRepository: TimelineRepository, private val timelineRepository: TimelineRepository,
private val idGenerateService: IdGenerateService, transaction: Transaction, private val idGenerateService: IdGenerateService,
transaction: Transaction,
private val timelineRelationshipRepository: TimelineRelationshipRepository private val timelineRelationshipRepository: TimelineRelationshipRepository
) : AbstractApplicationService<RegisterHomeTimeline, Unit>(transaction, logger) { ) : AbstractApplicationService<RegisterHomeTimeline, Unit>(transaction, logger) {
override suspend fun internalExecute(command: RegisterHomeTimeline, principal: Principal) { override suspend fun internalExecute(command: RegisterHomeTimeline, principal: Principal) {
val userDetail = (
val userDetail = (userDetailRepository.findById(UserDetailId(command.userDetailId)) userDetailRepository.findById(UserDetailId(command.userDetailId))
?: throw IllegalArgumentException("UserDetail ${command.userDetailId} not found.")) ?: throw IllegalArgumentException("UserDetail ${command.userDetailId} not found.")
)
val timeline = Timeline.create( val timeline = Timeline.create(
TimelineId(idGenerateService.generateId()), TimelineId(idGenerateService.generateId()),

View File

@ -41,7 +41,6 @@ class ReadTimelineApplicationService(
) )
val postDetailList = timeline.map { val postDetailList = timeline.map {
val reply = if (it.replyPost != null) { val reply = if (it.replyPost != null) {
PostDetail.of( PostDetail.of(
it.replyPost, it.replyPost,

View File

@ -15,7 +15,8 @@ class SetTimelineToTimelineStoreApplicationService(
private val timelineRepository: TimelineRepository private val timelineRepository: TimelineRepository
) : ) :
AbstractApplicationService<SetTimleineStore, Unit>( AbstractApplicationService<SetTimleineStore, Unit>(
transaction, logger transaction,
logger
) { ) {
override suspend fun internalExecute(command: SetTimleineStore, principal: Principal) { override suspend fun internalExecute(command: SetTimleineStore, principal: Principal) {
val findById = timelineRepository.findById(command.timelineId) val findById = timelineRepository.findById(command.timelineId)

View File

@ -63,7 +63,6 @@ class ExposedActorInstanceRelationshipRepository(override val domainEventPublish
update(actorInstanceRelationship) update(actorInstanceRelationship)
} }
} }
} }
override suspend fun findByActorIdAndInstanceId( override suspend fun findByActorIdAndInstanceId(

View File

@ -204,7 +204,6 @@ class ExposedPostRepository(
update(post) update(post)
} }
} }
} }
override suspend fun findByActorIdAndVisibilityInList( override suspend fun findByActorIdAndVisibilityInList(

View File

@ -64,7 +64,6 @@ class ExposedRelationshipRepository(override val domainEventPublisher: DomainEve
update(relationship) update(relationship)
} }
} }
} }
override suspend fun findByActorIdAndTargetId(actorId: ActorId, targetId: ActorId): Relationship? = query { override suspend fun findByActorIdAndTargetId(actorId: ActorId, targetId: ActorId): Relationship? = query {

View File

@ -29,7 +29,6 @@ class ExposedTimelineRepository(override val domainEventPublisher: DomainEventPu
} }
} }
return timeline return timeline
} }
@ -42,7 +41,6 @@ class ExposedTimelineRepository(override val domainEventPublisher: DomainEventPu
update(timeline) update(timeline)
} }
} }
} }
override suspend fun findByIds(ids: List<TimelineId>): List<Timeline> { override suspend fun findByIds(ids: List<TimelineId>): List<Timeline> {

View File

@ -32,8 +32,10 @@ import org.slf4j.LoggerFactory
import org.springframework.stereotype.Repository import org.springframework.stereotype.Repository
@Repository @Repository
class UserDetailRepositoryImpl(override val domainEventPublisher: DomainEventPublisher) : UserDetailRepository, class UserDetailRepositoryImpl(override val domainEventPublisher: DomainEventPublisher) :
AbstractRepository(), DomainEventPublishableRepository<UserDetail> { UserDetailRepository,
AbstractRepository(),
DomainEventPublishableRepository<UserDetail> {
override val logger: Logger override val logger: Logger
get() = Companion.logger get() = Companion.logger
@ -68,14 +70,13 @@ class UserDetailRepositoryImpl(override val domainEventPublisher: DomainEventPub
return userDetail1 return userDetail1
} }
override suspend fun delete(userDetail: UserDetail): Unit { override suspend fun delete(userDetail: UserDetail) {
query { query {
UserDetails.deleteWhere { id eq userDetail.id.id } UserDetails.deleteWhere { id eq userDetail.id.id }
onComplete { onComplete {
update(userDetail) update(userDetail)
} }
} }
} }
override suspend fun findByActorId(actorId: Long): UserDetail? = query { override suspend fun findByActorId(actorId: Long): UserDetail? = query {

View File

@ -156,8 +156,6 @@ open class DefaultTimelineStore(
) )
} }
return PaginationList(emptyList(), page?.maxId?.let { PostId(it) }, page?.minId?.let { PostId(it) }) return PaginationList(emptyList(), page?.maxId?.let { PostId(it) }, page?.minId?.let { PostId(it) })
} }
override suspend fun getActors(actorIds: List<ActorId>): Map<ActorId, Actor> { override suspend fun getActors(actorIds: List<ActorId>): Map<ActorId, Actor> {

View File

@ -45,7 +45,8 @@ class TimelineController(
minId = minId?.toLongOrNull(), minId = minId?.toLongOrNull(),
limit = 20 limit = 20
) )
), principal ),
principal
) )
model.addAttribute("timeline", execute) model.addAttribute("timeline", execute)