mirror of https://github.com/usbharu/Hideout.git
style: fix lint
This commit is contained in:
parent
2d8deb0d4f
commit
a099b63706
|
@ -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)
|
||||||
|
|
|
@ -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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) }
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue