From 8f3286d745ce352ba33c919c79e24a33a0b7053a Mon Sep 17 00:00:00 2001 From: usbharu Date: Tue, 25 Feb 2025 11:30:38 +0900 Subject: [PATCH] style: fix lint --- .../activitypub/application/nodeinfo/Nodeinfo2_0.kt | 1 + .../interfaces/wellknown/HostmetaController.kt | 8 ++------ .../interfaces/wellknown/NodeinfoController.kt | 8 ++------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/application/nodeinfo/Nodeinfo2_0.kt b/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/application/nodeinfo/Nodeinfo2_0.kt index 519477dd..281099e0 100644 --- a/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/application/nodeinfo/Nodeinfo2_0.kt +++ b/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/application/nodeinfo/Nodeinfo2_0.kt @@ -1,5 +1,6 @@ package dev.usbharu.hideout.activitypub.application.nodeinfo +@Suppress("ClassName") data class Nodeinfo2_0( val version: String = "2,0", val software: Map, diff --git a/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/wellknown/HostmetaController.kt b/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/wellknown/HostmetaController.kt index 7b11c9cb..81641d1a 100644 --- a/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/wellknown/HostmetaController.kt +++ b/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/wellknown/HostmetaController.kt @@ -19,12 +19,8 @@ class HostmetaController(private val linkList: List = emptyList()) { @Order(2) @GetMapping("/host-meta", produces = ["application/json"]) - fun hostmetaJson(): XRD { - return XRD(linkList) - } + fun hostmetaJson(): XRD = XRD(linkList) @GetMapping("/host-meta.json", produces = ["application/json"]) - fun hostmetaJson2(): XRD { - return XRD(linkList) - } + fun hostmetaJson2(): XRD = XRD(linkList) } diff --git a/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/wellknown/NodeinfoController.kt b/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/wellknown/NodeinfoController.kt index 35598fa9..4fc95339 100644 --- a/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/wellknown/NodeinfoController.kt +++ b/hideout/hideout-activitypub/src/main/kotlin/dev/usbharu/hideout/activitypub/interfaces/wellknown/NodeinfoController.kt @@ -28,12 +28,8 @@ class NodeinfoController( ) @GetMapping("/nodeinfo/2.0", produces = ["application/json"]) - suspend fun nodeinfo2_0(): Nodeinfo2_0 { - return nodeinfoApplicationService.execute(NodeinfoRequest("2.0"), Anonymous) - } + suspend fun nodeinfo2_0(): Nodeinfo2_0 = nodeinfoApplicationService.execute(NodeinfoRequest("2.0"), Anonymous) @GetMapping("/nodeinfo/2.1", produces = ["application/json"]) - suspend fun nodeinfo2_1(): Nodeinfo2_0 { - return nodeinfoApplicationService.execute(NodeinfoRequest("2.1"), Anonymous) - } + suspend fun nodeinfo2_1(): Nodeinfo2_0 = nodeinfoApplicationService.execute(NodeinfoRequest("2.1"), Anonymous) }