style: fix lint

This commit is contained in:
usbharu 2023-12-13 17:40:20 +09:00
parent db45838d95
commit cc4c642d8c
6 changed files with 7 additions and 8 deletions

View File

@ -47,8 +47,6 @@ class APDeleteProcessor(
} catch (e: FailedToGetResourcesException) {
logger.warn("FAILED delete id: {} is not found.", deleteId, e)
}
}
override fun isSupported(activityType: ActivityType): Boolean = activityType == ActivityType.Delete

View File

@ -78,6 +78,7 @@ data class Post private constructor(
)
}
@Suppress("LongParameterList")
fun deleteOf(
id: Long,
visibility: Visibility,

View File

@ -12,8 +12,8 @@ class PostResultRowMapper(private val postBuilder: Post.PostBuilder) : ResultRow
override fun map(resultRow: ResultRow): Post {
if (resultRow[Posts.deleted]) {
return postBuilder.deleteOf(
resultRow[Posts.id],
Visibility.values().first { it.ordinal == resultRow[Posts.visibility] },
id = resultRow[Posts.id],
visibility = Visibility.values().first { it.ordinal == resultRow[Posts.visibility] },
url = resultRow[Posts.url],
repostId = resultRow[Posts.repostId],
replyId = resultRow[Posts.replyId],

View File

@ -34,7 +34,6 @@ class PostQueryServiceImpl(
.let(postQueryMapper::map)
.singleOr { FailedToGetResourcesException("apId: $string is duplicate or does not exist.", it) }
override suspend fun findByActorId(actorId: Long): List<Post> {
return Posts.leftJoin(PostsMedia).select { Posts.actorId eq actorId }.let(postQueryMapper::map)
}
override suspend fun findByActorId(actorId: Long): List<Post> =
Posts.leftJoin(PostsMedia).select { Posts.actorId eq actorId }.let(postQueryMapper::map)
}

View File

@ -6,7 +6,7 @@ interface RelationshipQueryService {
suspend fun findByTargetIdAndFollowing(targetId: Long, following: Boolean): List<Relationship>
@Suppress("LongParameterList")
@Suppress("LongParameterList", "FunctionMaxLength")
suspend fun findByTargetIdAndFollowRequestAndIgnoreFollowRequest(
maxId: Long?,
sinceId: Long?,

View File

@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional
import java.time.Instant
@Service
@Suppress("LongParameterList")
class UserServiceImpl(
private val actorRepository: ActorRepository,
private val userAuthService: UserAuthService,