diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipUnfollowSubscriber.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipUnfollowSubscriber.kt index 018420d8..0430a7a2 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipUnfollowSubscriber.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/domainevent/subscribers/TimelineRelationshipUnfollowSubscriber.kt @@ -43,4 +43,4 @@ class TimelineRelationshipUnfollowSubscriber( companion object { private val logger = LoggerFactory.getLogger(TimelineRelationshipUnfollowSubscriber::class.java) } -} \ No newline at end of file +} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt index f6cf8e5c..2ebced42 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserGetTimelinesApplicationService.kt @@ -13,10 +13,10 @@ import org.springframework.stereotype.Service @Service class UserGetTimelinesApplicationService(transaction: Transaction, private val timelineRepository: TimelineRepository) : AbstractApplicationService>( - transaction, logger + transaction, + logger ) { override suspend fun internalExecute(command: GetTimelines, principal: Principal): List { - 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) } -} \ No newline at end of file +} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt index cdb434bf..ee2819bd 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/application/timeline/UserRemoveTimelineRelationshipApplicationService.kt @@ -16,15 +16,20 @@ class UserRemoveTimelineRelationshipApplicationService( private val timelineRepository: TimelineRepository ) : LocalUserAbstractApplicationService( - 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) } -} \ No newline at end of file +} diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/relationship/Relationship.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/relationship/Relationship.kt index 9f7e4f6f..f1f48851 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/relationship/Relationship.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/relationship/Relationship.kt @@ -50,7 +50,6 @@ class Relationship( val relationshipEventFactory = RelationshipEventFactory(this) addDomainEvent(relationshipEventFactory.createEvent(RelationshipEvent.UNFOLLOW)) addDomainEvent(relationshipEventFactory.createEvent(RelationshipEvent.UNFOLLOW_REQUEST)) - } fun block() { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt index c2adad5d..a7d8a900 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/interfaces/web/user/UserController.kt @@ -57,7 +57,6 @@ class UserController( null } - model.addAttribute("relationship", relationship) model.addAttribute( "userTimeline",