mirror of https://github.com/usbharu/Hideout.git
style: fix lint (CI)
This commit is contained in:
parent
0c3e69a7e4
commit
cf1327eae4
|
@ -43,4 +43,4 @@ class TimelineRelationshipUnfollowSubscriber(
|
|||
companion object {
|
||||
private val logger = LoggerFactory.getLogger(TimelineRelationshipUnfollowSubscriber::class.java)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ class Relationship(
|
|||
val relationshipEventFactory = RelationshipEventFactory(this)
|
||||
addDomainEvent(relationshipEventFactory.createEvent(RelationshipEvent.UNFOLLOW))
|
||||
addDomainEvent(relationshipEventFactory.createEvent(RelationshipEvent.UNFOLLOW_REQUEST))
|
||||
|
||||
}
|
||||
|
||||
fun block() {
|
||||
|
|
|
@ -57,7 +57,6 @@ class UserController(
|
|||
null
|
||||
}
|
||||
|
||||
|
||||
model.addAttribute("relationship", relationship)
|
||||
model.addAttribute(
|
||||
"userTimeline",
|
||||
|
|
Loading…
Reference in New Issue