mirror of https://github.com/usbharu/Hideout.git
style: fix lint (CI)
This commit is contained in:
parent
3105c6cf65
commit
29ff1269ce
|
@ -18,13 +18,15 @@ import org.springframework.stereotype.Component
|
|||
class UserRegisterHomeTimelineApplicationService(
|
||||
private val userDetailRepository: UserDetailRepository,
|
||||
private val timelineRepository: TimelineRepository,
|
||||
private val idGenerateService: IdGenerateService, transaction: Transaction,
|
||||
private val idGenerateService: IdGenerateService,
|
||||
transaction: Transaction,
|
||||
private val timelineRelationshipRepository: TimelineRelationshipRepository
|
||||
) : AbstractApplicationService<RegisterHomeTimeline, Unit>(transaction, logger) {
|
||||
override suspend fun internalExecute(command: RegisterHomeTimeline, principal: Principal) {
|
||||
|
||||
val userDetail = (userDetailRepository.findById(UserDetailId(command.userDetailId))
|
||||
?: throw IllegalArgumentException("UserDetail ${command.userDetailId} not found."))
|
||||
val userDetail = (
|
||||
userDetailRepository.findById(UserDetailId(command.userDetailId))
|
||||
?: throw IllegalArgumentException("UserDetail ${command.userDetailId} not found.")
|
||||
)
|
||||
|
||||
val timeline = Timeline.create(
|
||||
TimelineId(idGenerateService.generateId()),
|
||||
|
|
|
@ -41,7 +41,6 @@ class ReadTimelineApplicationService(
|
|||
)
|
||||
|
||||
val postDetailList = timeline.map {
|
||||
|
||||
val reply = if (it.replyPost != null) {
|
||||
PostDetail.of(
|
||||
it.replyPost,
|
||||
|
|
|
@ -15,7 +15,8 @@ class SetTimelineToTimelineStoreApplicationService(
|
|||
private val timelineRepository: TimelineRepository
|
||||
) :
|
||||
AbstractApplicationService<SetTimleineStore, Unit>(
|
||||
transaction, logger
|
||||
transaction,
|
||||
logger
|
||||
) {
|
||||
override suspend fun internalExecute(command: SetTimleineStore, principal: Principal) {
|
||||
val findById = timelineRepository.findById(command.timelineId)
|
||||
|
|
|
@ -63,7 +63,6 @@ class ExposedActorInstanceRelationshipRepository(override val domainEventPublish
|
|||
update(actorInstanceRelationship)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override suspend fun findByActorIdAndInstanceId(
|
||||
|
|
|
@ -204,7 +204,6 @@ class ExposedPostRepository(
|
|||
update(post)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override suspend fun findByActorIdAndVisibilityInList(
|
||||
|
|
|
@ -64,7 +64,6 @@ class ExposedRelationshipRepository(override val domainEventPublisher: DomainEve
|
|||
update(relationship)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override suspend fun findByActorIdAndTargetId(actorId: ActorId, targetId: ActorId): Relationship? = query {
|
||||
|
|
|
@ -29,7 +29,6 @@ class ExposedTimelineRepository(override val domainEventPublisher: DomainEventPu
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
return timeline
|
||||
}
|
||||
|
||||
|
@ -42,7 +41,6 @@ class ExposedTimelineRepository(override val domainEventPublisher: DomainEventPu
|
|||
update(timeline)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override suspend fun findByIds(ids: List<TimelineId>): List<Timeline> {
|
||||
|
|
|
@ -32,8 +32,10 @@ import org.slf4j.LoggerFactory
|
|||
import org.springframework.stereotype.Repository
|
||||
|
||||
@Repository
|
||||
class UserDetailRepositoryImpl(override val domainEventPublisher: DomainEventPublisher) : UserDetailRepository,
|
||||
AbstractRepository(), DomainEventPublishableRepository<UserDetail> {
|
||||
class UserDetailRepositoryImpl(override val domainEventPublisher: DomainEventPublisher) :
|
||||
UserDetailRepository,
|
||||
AbstractRepository(),
|
||||
DomainEventPublishableRepository<UserDetail> {
|
||||
override val logger: Logger
|
||||
get() = Companion.logger
|
||||
|
||||
|
@ -68,14 +70,13 @@ class UserDetailRepositoryImpl(override val domainEventPublisher: DomainEventPub
|
|||
return userDetail1
|
||||
}
|
||||
|
||||
override suspend fun delete(userDetail: UserDetail): Unit {
|
||||
override suspend fun delete(userDetail: UserDetail) {
|
||||
query {
|
||||
UserDetails.deleteWhere { id eq userDetail.id.id }
|
||||
onComplete {
|
||||
update(userDetail)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override suspend fun findByActorId(actorId: Long): UserDetail? = query {
|
||||
|
|
|
@ -156,8 +156,6 @@ open class DefaultTimelineStore(
|
|||
)
|
||||
}
|
||||
return PaginationList(emptyList(), page?.maxId?.let { PostId(it) }, page?.minId?.let { PostId(it) })
|
||||
|
||||
|
||||
}
|
||||
|
||||
override suspend fun getActors(actorIds: List<ActorId>): Map<ActorId, Actor> {
|
||||
|
|
|
@ -45,7 +45,8 @@ class TimelineController(
|
|||
minId = minId?.toLongOrNull(),
|
||||
limit = 20
|
||||
)
|
||||
), principal
|
||||
),
|
||||
principal
|
||||
)
|
||||
|
||||
model.addAttribute("timeline", execute)
|
||||
|
|
Loading…
Reference in New Issue