mirror of https://github.com/usbharu/Hideout.git
style: fix lint
This commit is contained in:
parent
046ca2c155
commit
9943809bfc
|
@ -17,7 +17,9 @@ class NoteApControllerImpl(private val noteApApiService: NoteApApiService) : Not
|
||||||
@CurrentSecurityContext context: SecurityContext
|
@CurrentSecurityContext context: SecurityContext
|
||||||
): ResponseEntity<Note> {
|
): ResponseEntity<Note> {
|
||||||
val userId =
|
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
|
(context.authentication.details as HttpSignatureUser).id
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
|
|
|
@ -21,7 +21,6 @@ class NoteQueryServiceImpl(private val postRepository: PostRepository) : NoteQue
|
||||||
.leftJoin(Media)
|
.leftJoin(Media)
|
||||||
.select { Posts.id eq id }
|
.select { Posts.id eq id }
|
||||||
.let { it.toNote() to it.toPost().first() }
|
.let { it.toNote() to it.toPost().first() }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun ResultRow.toNote(mediaList: List<dev.usbharu.hideout.domain.model.hideout.entity.Media>): Note {
|
private suspend fun ResultRow.toNote(mediaList: List<dev.usbharu.hideout.domain.model.hideout.entity.Media>): Note {
|
||||||
|
|
|
@ -18,9 +18,9 @@ class HttpSignatureFilter(private val httpSignatureHeaderParser: SignatureHeader
|
||||||
|
|
||||||
val signature = try {
|
val signature = try {
|
||||||
httpSignatureHeaderParser.parse(HttpHeaders(headers))
|
httpSignatureHeaderParser.parse(HttpHeaders(headers))
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (_: IllegalArgumentException) {
|
||||||
return null
|
return null
|
||||||
} catch (e: RuntimeException) {
|
} catch (_: RuntimeException) {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return signature.keyId
|
return signature.keyId
|
||||||
|
|
Loading…
Reference in New Issue