diff --git a/src/main/kotlin/dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt b/src/main/kotlin/dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt index d934449c..2ad64bd9 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/core/MdcXrequestIdFilter.kt @@ -21,6 +21,6 @@ class MdcXrequestIdFilter : Filter { } companion object { - val KEY = "x-request-id" + private const val KEY = "x-request-id" } } diff --git a/src/main/kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt index f4d36084..ac5e54c6 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/post/PostServiceImpl.kt @@ -35,7 +35,7 @@ class PostServiceImpl( private suspend fun internalCreate(post: Post, isLocal: Boolean): Post { val save = try { postRepository.save(post) - } catch (e: ExposedSQLException) { + } catch (_: ExposedSQLException) { postQueryService.findByApId(post.apId) } timelineService.publishTimeline(save, isLocal) diff --git a/src/main/kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt index 2af93ed6..0f865526 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/user/UserServiceImpl.kt @@ -67,7 +67,7 @@ class UserServiceImpl( ) return try { userRepository.save(userEntity) - } catch (e: ExposedSQLException) { + } catch (_: ExposedSQLException) { userQueryService.findByUrl(user.url) } }