style: fix lint

This commit is contained in:
usbharu 2023-10-23 13:39:30 +09:00
parent 046ca2c155
commit 9943809bfc
3 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,9 @@ class NoteApControllerImpl(private val noteApApiService: NoteApApiService) : Not
@CurrentSecurityContext context: SecurityContext
): ResponseEntity<Note> {
val userId =
if (context.authentication is PreAuthenticatedAuthenticationToken && context.authentication.details is HttpSignatureUser) {
if (context.authentication is PreAuthenticatedAuthenticationToken &&
context.authentication.details is HttpSignatureUser
) {
(context.authentication.details as HttpSignatureUser).id
} else {
null

View File

@ -21,7 +21,6 @@ class NoteQueryServiceImpl(private val postRepository: PostRepository) : NoteQue
.leftJoin(Media)
.select { Posts.id eq id }
.let { it.toNote() to it.toPost().first() }
}
private suspend fun ResultRow.toNote(mediaList: List<dev.usbharu.hideout.domain.model.hideout.entity.Media>): Note {

View File

@ -18,9 +18,9 @@ class HttpSignatureFilter(private val httpSignatureHeaderParser: SignatureHeader
val signature = try {
httpSignatureHeaderParser.parse(HttpHeaders(headers))
} catch (e: IllegalArgumentException) {
} catch (_: IllegalArgumentException) {
return null
} catch (e: RuntimeException) {
} catch (_: RuntimeException) {
return ""
}
return signature.keyId