mirror of https://github.com/usbharu/Hideout.git
style: fix lint
This commit is contained in:
parent
db45838d95
commit
cc4c642d8c
|
@ -47,8 +47,6 @@ class APDeleteProcessor(
|
||||||
} catch (e: FailedToGetResourcesException) {
|
} catch (e: FailedToGetResourcesException) {
|
||||||
logger.warn("FAILED delete id: {} is not found.", deleteId, e)
|
logger.warn("FAILED delete id: {} is not found.", deleteId, e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isSupported(activityType: ActivityType): Boolean = activityType == ActivityType.Delete
|
override fun isSupported(activityType: ActivityType): Boolean = activityType == ActivityType.Delete
|
||||||
|
|
|
@ -78,6 +78,7 @@ data class Post private constructor(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("LongParameterList")
|
||||||
fun deleteOf(
|
fun deleteOf(
|
||||||
id: Long,
|
id: Long,
|
||||||
visibility: Visibility,
|
visibility: Visibility,
|
||||||
|
|
|
@ -12,8 +12,8 @@ class PostResultRowMapper(private val postBuilder: Post.PostBuilder) : ResultRow
|
||||||
override fun map(resultRow: ResultRow): Post {
|
override fun map(resultRow: ResultRow): Post {
|
||||||
if (resultRow[Posts.deleted]) {
|
if (resultRow[Posts.deleted]) {
|
||||||
return postBuilder.deleteOf(
|
return postBuilder.deleteOf(
|
||||||
resultRow[Posts.id],
|
id = resultRow[Posts.id],
|
||||||
Visibility.values().first { it.ordinal == resultRow[Posts.visibility] },
|
visibility = Visibility.values().first { it.ordinal == resultRow[Posts.visibility] },
|
||||||
url = resultRow[Posts.url],
|
url = resultRow[Posts.url],
|
||||||
repostId = resultRow[Posts.repostId],
|
repostId = resultRow[Posts.repostId],
|
||||||
replyId = resultRow[Posts.replyId],
|
replyId = resultRow[Posts.replyId],
|
||||||
|
|
|
@ -34,7 +34,6 @@ class PostQueryServiceImpl(
|
||||||
.let(postQueryMapper::map)
|
.let(postQueryMapper::map)
|
||||||
.singleOr { FailedToGetResourcesException("apId: $string is duplicate or does not exist.", it) }
|
.singleOr { FailedToGetResourcesException("apId: $string is duplicate or does not exist.", it) }
|
||||||
|
|
||||||
override suspend fun findByActorId(actorId: Long): List<Post> {
|
override suspend fun findByActorId(actorId: Long): List<Post> =
|
||||||
return Posts.leftJoin(PostsMedia).select { Posts.actorId eq actorId }.let(postQueryMapper::map)
|
Posts.leftJoin(PostsMedia).select { Posts.actorId eq actorId }.let(postQueryMapper::map)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ interface RelationshipQueryService {
|
||||||
|
|
||||||
suspend fun findByTargetIdAndFollowing(targetId: Long, following: Boolean): List<Relationship>
|
suspend fun findByTargetIdAndFollowing(targetId: Long, following: Boolean): List<Relationship>
|
||||||
|
|
||||||
@Suppress("LongParameterList")
|
@Suppress("LongParameterList", "FunctionMaxLength")
|
||||||
suspend fun findByTargetIdAndFollowRequestAndIgnoreFollowRequest(
|
suspend fun findByTargetIdAndFollowRequestAndIgnoreFollowRequest(
|
||||||
maxId: Long?,
|
maxId: Long?,
|
||||||
sinceId: Long?,
|
sinceId: Long?,
|
||||||
|
|
|
@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Suppress("LongParameterList")
|
||||||
class UserServiceImpl(
|
class UserServiceImpl(
|
||||||
private val actorRepository: ActorRepository,
|
private val actorRepository: ActorRepository,
|
||||||
private val userAuthService: UserAuthService,
|
private val userAuthService: UserAuthService,
|
||||||
|
|
Loading…
Reference in New Issue