style: fix lint (CI)

This commit is contained in:
usbharu 2024-09-07 14:29:44 +00:00 committed by github-actions[bot]
parent 0c3e69a7e4
commit cf1327eae4
5 changed files with 15 additions and 12 deletions

View File

@ -43,4 +43,4 @@ class TimelineRelationshipUnfollowSubscriber(
companion object {
private val logger = LoggerFactory.getLogger(TimelineRelationshipUnfollowSubscriber::class.java)
}
}
}

View File

@ -13,10 +13,10 @@ import org.springframework.stereotype.Service
@Service
class UserGetTimelinesApplicationService(transaction: Transaction, private val timelineRepository: TimelineRepository) :
AbstractApplicationService<GetTimelines, List<Timeline>>(
transaction, logger
transaction,
logger
) {
override suspend fun internalExecute(command: GetTimelines, principal: Principal): List<Timeline> {
val userDetailId = UserDetailId(command.userDetailId)
val timelineVisibility = if (userDetailId == principal.userDetailId) {
@ -34,4 +34,4 @@ class UserGetTimelinesApplicationService(transaction: Transaction, private val t
companion object {
private val logger = LoggerFactory.getLogger(UserGetTimelinesApplicationService::class.java)
}
}
}

View File

@ -16,15 +16,20 @@ class UserRemoveTimelineRelationshipApplicationService(
private val timelineRepository: TimelineRepository
) :
LocalUserAbstractApplicationService<RemoveTimelineRelationship, Unit>(
transaction, logger
transaction,
logger
) {
override suspend fun internalExecute(command: RemoveTimelineRelationship, principal: LocalUser) {
val timelineRelationship = (timelineRelationshipRepository.findById(command.timelineRelationshipId)
?: throw IllegalArgumentException("TimelineRelationship ${command.timelineRelationshipId} not found."))
val timelineRelationship = (
timelineRelationshipRepository.findById(command.timelineRelationshipId)
?: throw IllegalArgumentException("TimelineRelationship ${command.timelineRelationshipId} not found.")
)
val timeline = (timelineRepository.findById(timelineRelationship.timelineId)
?: throw IllegalArgumentException("Timeline ${timelineRelationship.timelineId} not found."))
val timeline = (
timelineRepository.findById(timelineRelationship.timelineId)
?: throw IllegalArgumentException("Timeline ${timelineRelationship.timelineId} not found.")
)
if (timeline.userDetailId != principal.userDetailId) {
throw PermissionDeniedException()
@ -36,4 +41,4 @@ class UserRemoveTimelineRelationshipApplicationService(
companion object {
private val logger = LoggerFactory.getLogger(UserRemoveTimelineRelationshipApplicationService::class.java)
}
}
}

View File

@ -50,7 +50,6 @@ class Relationship(
val relationshipEventFactory = RelationshipEventFactory(this)
addDomainEvent(relationshipEventFactory.createEvent(RelationshipEvent.UNFOLLOW))
addDomainEvent(relationshipEventFactory.createEvent(RelationshipEvent.UNFOLLOW_REQUEST))
}
fun block() {

View File

@ -57,7 +57,6 @@ class UserController(
null
}
model.addAttribute("relationship", relationship)
model.addAttribute(
"userTimeline",