mirror of https://github.com/usbharu/Hideout.git
style: fix lint
This commit is contained in:
parent
ee23ce8b82
commit
da106a6922
|
@ -22,7 +22,5 @@ class MessageSourceConfig {
|
|||
@Bean
|
||||
@Profile("dev")
|
||||
@ConfigurationProperties(prefix = "spring.messages")
|
||||
fun messageSourceProperties(): MessageSourceProperties {
|
||||
return MessageSourceProperties()
|
||||
}
|
||||
fun messageSourceProperties(): MessageSourceProperties = MessageSourceProperties()
|
||||
}
|
||||
|
|
|
@ -140,6 +140,7 @@ class SecurityConfig {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@Suppress("UnsafeCallOnNullableType")
|
||||
fun loadJwkSource(jwkConfig: JwkConfig, applicationConfig: ApplicationConfig): JWKSource<SecurityContext> {
|
||||
if (jwkConfig.keyId == null) {
|
||||
logger.error("hideout.security.jwt.keyId is null.")
|
||||
|
|
|
@ -18,7 +18,5 @@ package dev.usbharu.hideout.core.domain.model.userdetails
|
|||
|
||||
@JvmInline
|
||||
value class UserDetailHashedPassword(val password: String) {
|
||||
override fun toString(): String {
|
||||
return "[MASKED]"
|
||||
}
|
||||
override fun toString(): String = "[MASKED]"
|
||||
}
|
||||
|
|
|
@ -18,7 +18,5 @@ package dev.usbharu.hideout.core.domain.model.userdetails
|
|||
|
||||
@JvmInline
|
||||
value class UserDetailId(val id: Long) {
|
||||
override fun toString(): String {
|
||||
return "UserDetailId(id=$id)"
|
||||
}
|
||||
override fun toString(): String = "UserDetailId(id=$id)"
|
||||
}
|
||||
|
|
|
@ -17,6 +17,9 @@ import java.net.URI
|
|||
@Repository
|
||||
class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractRepository() {
|
||||
|
||||
override val logger: Logger
|
||||
get() = Companion.logger
|
||||
|
||||
protected fun authorizedQuery(principal: Principal? = null): QueryAlias {
|
||||
if (principal == null) {
|
||||
return Posts
|
||||
|
@ -73,8 +76,8 @@ class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractReposi
|
|||
|
||||
private fun toPostDetail(it: ResultRow, authorizedQuery: QueryAlias, iconMedia: Alias<Media>): PostDetail {
|
||||
return PostDetail(
|
||||
it[authorizedQuery[Posts.id]],
|
||||
ActorDetail(
|
||||
id = it[authorizedQuery[Posts.id]],
|
||||
actor = ActorDetail(
|
||||
actorId = it[authorizedQuery[Posts.actorId]],
|
||||
instanceId = it[Actors.instance],
|
||||
name = it[Actors.name],
|
||||
|
@ -101,9 +104,6 @@ class ExposedUserTimelineQueryService : UserTimelineQueryService, AbstractReposi
|
|||
)
|
||||
}
|
||||
|
||||
override val logger: Logger
|
||||
get() = Companion.logger
|
||||
|
||||
companion object {
|
||||
private val logger = LoggerFactory.getLogger(ExposedUserTimelineQueryService::class.java)
|
||||
}
|
||||
|
|
|
@ -60,7 +60,6 @@ class AuthController(
|
|||
}
|
||||
|
||||
@GetMapping("/auth/sign_out")
|
||||
fun signOut(): String {
|
||||
return "sign_out"
|
||||
}
|
||||
@Suppress("FunctionOnlyReturningConstant")
|
||||
fun signOut(): String = "sign_out"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package dev.usbharu.hideout.core.interfaces.web.posts
|
||||
|
||||
@Suppress("ConstructorParameterNaming")
|
||||
data class PublishPost(
|
||||
var status: String? = null,
|
||||
var overview: String? = null,
|
||||
|
|
|
@ -45,11 +45,7 @@ object RsaUtil {
|
|||
|
||||
fun decodeRsaPrivateKey(encoded: String): RSAPrivateKey = decodeRsaPrivateKey(Base64Util.decode(encoded))
|
||||
|
||||
fun encodeRsaPublicKey(publicKey: RSAPublicKey): String {
|
||||
return Base64Util.encode(publicKey.encoded)
|
||||
}
|
||||
fun encodeRsaPublicKey(publicKey: RSAPublicKey): String = Base64Util.encode(publicKey.encoded)
|
||||
|
||||
fun encodeRsaPrivateKey(privateKey: RSAPrivateKey): String {
|
||||
return Base64Util.encode(privateKey.encoded)
|
||||
}
|
||||
fun encodeRsaPrivateKey(privateKey: RSAPrivateKey): String = Base64Util.encode(privateKey.encoded)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue