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