From 1a30407d83fe37202e7e2879534f17a84b682a08 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:05:08 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/dev/usbharu/hideout/config/Config.kt | 1 + .../dev/usbharu/hideout/domain/model/hideout/entity/Post.kt | 1 + .../dev/usbharu/hideout/query/ReactionQueryServiceImpl.kt | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/config/Config.kt b/src/main/kotlin/dev/usbharu/hideout/config/Config.kt index 62ca7112..8acf1113 100644 --- a/src/main/kotlin/dev/usbharu/hideout/config/Config.kt +++ b/src/main/kotlin/dev/usbharu/hideout/config/Config.kt @@ -27,6 +27,7 @@ data class CharacterLimit( val privateKey: Int ) { companion object { + @Suppress("FunctionMinLength") fun of(url: Int? = null, domain: Int? = null, publicKey: Int? = null, privateKey: Int? = null): General { return General( url ?: 1000, diff --git a/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/entity/Post.kt b/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/entity/Post.kt index 858bea45..3ed6ac53 100644 --- a/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/entity/Post.kt +++ b/src/main/kotlin/dev/usbharu/hideout/domain/model/hideout/entity/Post.kt @@ -16,6 +16,7 @@ data class Post private constructor( val apId: String = url ) { companion object { + @Suppress("FunctionMinLength", "LongParameterList") fun of( id: Long, userId: Long, diff --git a/src/main/kotlin/dev/usbharu/hideout/query/ReactionQueryServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/query/ReactionQueryServiceImpl.kt index 00baae4e..de41d1cb 100644 --- a/src/main/kotlin/dev/usbharu/hideout/query/ReactionQueryServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/query/ReactionQueryServiceImpl.kt @@ -53,7 +53,7 @@ class ReactionQueryServiceImpl : ReactionQueryService { return Reactions .leftJoin(Users, onColumn = { Reactions.userId }, otherColumn = { id }) .select { Reactions.postId.eq(postId) } - .groupBy { _: ResultRow -> ReactionResponse("❤", true, "", listOf()) } + .groupBy { _: ResultRow -> ReactionResponse("❤", true, "", emptyList()) } .map { entry: Map.Entry> -> entry.key.copy(accounts = entry.value.map { Account(it[Users.screenName], "", it[Users.url]) }) }