diff --git a/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/Person.kt b/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/Person.kt index 93f3f4cf..5c7f1176 100644 --- a/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/Person.kt +++ b/src/main/kotlin/dev/usbharu/hideout/domain/model/ap/Person.kt @@ -10,7 +10,6 @@ open class Person : Object { var publicKey: Key? = null var endpoints: Map = emptyMap() - protected constructor() : super() @Suppress("LongParameterList") @@ -66,5 +65,4 @@ open class Person : Object { result = 31 * result + endpoints.hashCode() return result } - } diff --git a/src/main/kotlin/dev/usbharu/hideout/plugins/StatusPages.kt b/src/main/kotlin/dev/usbharu/hideout/plugins/StatusPages.kt index 68b1f541..e0305692 100644 --- a/src/main/kotlin/dev/usbharu/hideout/plugins/StatusPages.kt +++ b/src/main/kotlin/dev/usbharu/hideout/plugins/StatusPages.kt @@ -7,7 +7,6 @@ import io.ktor.server.plugins.statuspages.* import io.ktor.server.response.* fun Application.configureStatusPages() { - install(StatusPages) { exception { call, cause -> call.respondText(text = "400: $cause", status = HttpStatusCode.BadRequest) diff --git a/src/main/kotlin/dev/usbharu/hideout/service/ap/APNoteService.kt b/src/main/kotlin/dev/usbharu/hideout/service/ap/APNoteService.kt index 77d06bb5..255c9804 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/ap/APNoteService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/ap/APNoteService.kt @@ -137,7 +137,6 @@ class APNoteServiceImpl( targetActor ) - val visibility = if (note.to.contains(public) && note.cc.contains(public)) { Visibility.PUBLIC diff --git a/src/main/kotlin/dev/usbharu/hideout/service/api/UserApiService.kt b/src/main/kotlin/dev/usbharu/hideout/service/api/UserApiService.kt index 4cdf8ac7..19636971 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/api/UserApiService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/api/UserApiService.kt @@ -46,7 +46,6 @@ class UserApiServiceImpl( userQueryService.findAll(min(limit ?: 100, 100), offset).map { UserResponse.from(it) } } - override suspend fun findById(id: Long): UserResponse = transaction.transaction { UserResponse.from(userQueryService.findById(id)) } @@ -71,7 +70,6 @@ class UserApiServiceImpl( followerQueryService.findFollowersById(userId).map { UserResponse.from(it) } } - override suspend fun findFollowings(userId: Long): List = transaction.transaction { followerQueryService.findFollowingById(userId).map { UserResponse.from(it) } } @@ -86,7 +84,6 @@ class UserApiServiceImpl( .map { UserResponse.from(it) } } - override suspend fun createUser(username: String, password: String): UserResponse { return transaction.transaction { if (userQueryService.existByNameAndDomain(username, Config.configData.domain)) { @@ -108,7 +105,8 @@ class UserApiServiceImpl( userQueryService.findByNameAndDomain( targetAcct.username, targetAcct.domain ?: Config.configData.domain - ).id, sourceId + ).id, + sourceId ) } } diff --git a/src/main/kotlin/dev/usbharu/hideout/util/CollectionUtil.kt b/src/main/kotlin/dev/usbharu/hideout/util/CollectionUtil.kt index 6f418646..3c0f74ed 100644 --- a/src/main/kotlin/dev/usbharu/hideout/util/CollectionUtil.kt +++ b/src/main/kotlin/dev/usbharu/hideout/util/CollectionUtil.kt @@ -1,7 +1,6 @@ package dev.usbharu.hideout.util -class CollectionUtil { -} +class CollectionUtil fun Iterable.singleOr(block: (e: RuntimeException) -> Throwable): T { return try {