style: スタイルを修正

This commit is contained in:
usbharu 2023-08-15 01:42:17 +09:00
parent 34333b1a2d
commit 4985af4291
5 changed files with 3 additions and 10 deletions

View File

@ -10,7 +10,6 @@ open class Person : Object {
var publicKey: Key? = null var publicKey: Key? = null
var endpoints: Map<String, String> = emptyMap() var endpoints: Map<String, String> = emptyMap()
protected constructor() : super() protected constructor() : super()
@Suppress("LongParameterList") @Suppress("LongParameterList")
@ -66,5 +65,4 @@ open class Person : Object {
result = 31 * result + endpoints.hashCode() result = 31 * result + endpoints.hashCode()
return result return result
} }
} }

View File

@ -7,7 +7,6 @@ import io.ktor.server.plugins.statuspages.*
import io.ktor.server.response.* import io.ktor.server.response.*
fun Application.configureStatusPages() { fun Application.configureStatusPages() {
install(StatusPages) { install(StatusPages) {
exception<IllegalArgumentException> { call, cause -> exception<IllegalArgumentException> { call, cause ->
call.respondText(text = "400: $cause", status = HttpStatusCode.BadRequest) call.respondText(text = "400: $cause", status = HttpStatusCode.BadRequest)

View File

@ -137,7 +137,6 @@ class APNoteServiceImpl(
targetActor targetActor
) )
val visibility = val visibility =
if (note.to.contains(public) && note.cc.contains(public)) { if (note.to.contains(public) && note.cc.contains(public)) {
Visibility.PUBLIC Visibility.PUBLIC

View File

@ -46,7 +46,6 @@ class UserApiServiceImpl(
userQueryService.findAll(min(limit ?: 100, 100), offset).map { UserResponse.from(it) } userQueryService.findAll(min(limit ?: 100, 100), offset).map { UserResponse.from(it) }
} }
override suspend fun findById(id: Long): UserResponse = override suspend fun findById(id: Long): UserResponse =
transaction.transaction { UserResponse.from(userQueryService.findById(id)) } transaction.transaction { UserResponse.from(userQueryService.findById(id)) }
@ -71,7 +70,6 @@ class UserApiServiceImpl(
followerQueryService.findFollowersById(userId).map { UserResponse.from(it) } followerQueryService.findFollowersById(userId).map { UserResponse.from(it) }
} }
override suspend fun findFollowings(userId: Long): List<UserResponse> = transaction.transaction { override suspend fun findFollowings(userId: Long): List<UserResponse> = transaction.transaction {
followerQueryService.findFollowingById(userId).map { UserResponse.from(it) } followerQueryService.findFollowingById(userId).map { UserResponse.from(it) }
} }
@ -86,7 +84,6 @@ class UserApiServiceImpl(
.map { UserResponse.from(it) } .map { UserResponse.from(it) }
} }
override suspend fun createUser(username: String, password: String): UserResponse { override suspend fun createUser(username: String, password: String): UserResponse {
return transaction.transaction { return transaction.transaction {
if (userQueryService.existByNameAndDomain(username, Config.configData.domain)) { if (userQueryService.existByNameAndDomain(username, Config.configData.domain)) {
@ -108,7 +105,8 @@ class UserApiServiceImpl(
userQueryService.findByNameAndDomain( userQueryService.findByNameAndDomain(
targetAcct.username, targetAcct.username,
targetAcct.domain ?: Config.configData.domain targetAcct.domain ?: Config.configData.domain
).id, sourceId ).id,
sourceId
) )
} }
} }

View File

@ -1,7 +1,6 @@
package dev.usbharu.hideout.util package dev.usbharu.hideout.util
class CollectionUtil { class CollectionUtil
}
fun <T> Iterable<T>.singleOr(block: (e: RuntimeException) -> Throwable): T { fun <T> Iterable<T>.singleOr(block: (e: RuntimeException) -> Throwable): T {
return try { return try {