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

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

View File

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

View File

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

View File

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