mirror of https://github.com/usbharu/Hideout.git
style: スタイルを修正
This commit is contained in:
parent
b07a0ffabb
commit
1a30407d83
|
@ -27,6 +27,7 @@ data class CharacterLimit(
|
||||||
val privateKey: Int
|
val privateKey: Int
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
|
@Suppress("FunctionMinLength")
|
||||||
fun of(url: Int? = null, domain: Int? = null, publicKey: Int? = null, privateKey: Int? = null): General {
|
fun of(url: Int? = null, domain: Int? = null, publicKey: Int? = null, privateKey: Int? = null): General {
|
||||||
return General(
|
return General(
|
||||||
url ?: 1000,
|
url ?: 1000,
|
||||||
|
|
|
@ -16,6 +16,7 @@ data class Post private constructor(
|
||||||
val apId: String = url
|
val apId: String = url
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
|
@Suppress("FunctionMinLength", "LongParameterList")
|
||||||
fun of(
|
fun of(
|
||||||
id: Long,
|
id: Long,
|
||||||
userId: Long,
|
userId: Long,
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ReactionQueryServiceImpl : ReactionQueryService {
|
||||||
return Reactions
|
return Reactions
|
||||||
.leftJoin(Users, onColumn = { Reactions.userId }, otherColumn = { id })
|
.leftJoin(Users, onColumn = { Reactions.userId }, otherColumn = { id })
|
||||||
.select { Reactions.postId.eq(postId) }
|
.select { Reactions.postId.eq(postId) }
|
||||||
.groupBy { _: ResultRow -> ReactionResponse("❤", true, "", listOf()) }
|
.groupBy { _: ResultRow -> ReactionResponse("❤", true, "", emptyList()) }
|
||||||
.map { entry: Map.Entry<ReactionResponse, List<ResultRow>> ->
|
.map { entry: Map.Entry<ReactionResponse, List<ResultRow>> ->
|
||||||
entry.key.copy(accounts = entry.value.map { Account(it[Users.screenName], "", it[Users.url]) })
|
entry.key.copy(accounts = entry.value.map { Account(it[Users.screenName], "", it[Users.url]) })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue