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
class InboxControllerImpl(private val apService: APService) : InboxController {
@Suppress("TooGenericExceptionCaught")
override suspend fun inbox(@RequestBody string: String): ResponseEntity<Unit> {
val parseActivity = try {
apService.parseActivity(string)

View File

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

View File

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

View File

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