style: fix lint

This commit is contained in:
usbharu 2023-10-27 14:10:04 +09:00
parent 2d8deb0d4f
commit a099b63706
4 changed files with 5 additions and 6 deletions

View File

@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RestController
@RestController @RestController
class InboxControllerImpl(private val apService: APService) : InboxController { class InboxControllerImpl(private val apService: APService) : InboxController {
@Suppress("TooGenericExceptionCaught")
override suspend fun inbox(@RequestBody string: String): ResponseEntity<Unit> { override suspend fun inbox(@RequestBody string: String): ResponseEntity<Unit> {
val parseActivity = try { val parseActivity = try {
apService.parseActivity(string) apService.parseActivity(string)

View File

@ -6,7 +6,5 @@ import org.springframework.stereotype.Component
@Component @Component
class UserQueryMapper(private val userResultRowMapper: ResultRowMapper<User>) : QueryMapper<User> { class UserQueryMapper(private val userResultRowMapper: ResultRowMapper<User>) : QueryMapper<User> {
override fun map(query: Query): List<User> { override fun map(query: Query): List<User> = query.map(userResultRowMapper::map)
return query.map(userResultRowMapper::map)
}
} }

View File

@ -55,9 +55,8 @@ class UserRepositoryImpl(
return user return user
} }
override suspend fun findById(id: Long): User? { override suspend fun findById(id: Long): User? =
return Users.select { Users.id eq id }.singleOrNull()?.let(userResultRowMapper::map) Users.select { Users.id eq id }.singleOrNull()?.let(userResultRowMapper::map)
}
override suspend fun deleteFollowRequest(id: Long, follower: Long) { override suspend fun deleteFollowRequest(id: Long, follower: Long) {
FollowRequests.deleteWhere { userId.eq(id) and followerId.eq(follower) } FollowRequests.deleteWhere { userId.eq(id) and followerId.eq(follower) }

View File

@ -40,6 +40,7 @@ class HttpSignatureUserDetailsService(
} }
} }
@Suppress("TooGenericExceptionCaught")
val verify = try { val verify = try {
httpSignatureVerifier.verify( httpSignatureVerifier.verify(
token.credentials as HttpRequest, token.credentials as HttpRequest,