style: fix lint

This commit is contained in:
usbharu 2025-02-25 11:30:38 +09:00
parent 5e073233da
commit 8f3286d745
Signed by: usbharu
GPG Key ID: 8CB1087135660B8D
3 changed files with 5 additions and 12 deletions

View File

@ -1,5 +1,6 @@
package dev.usbharu.hideout.activitypub.application.nodeinfo package dev.usbharu.hideout.activitypub.application.nodeinfo
@Suppress("ClassName")
data class Nodeinfo2_0( data class Nodeinfo2_0(
val version: String = "2,0", val version: String = "2,0",
val software: Map<String, String>, val software: Map<String, String>,

View File

@ -19,12 +19,8 @@ class HostmetaController(private val linkList: List<Link> = emptyList()) {
@Order(2) @Order(2)
@GetMapping("/host-meta", produces = ["application/json"]) @GetMapping("/host-meta", produces = ["application/json"])
fun hostmetaJson(): XRD { fun hostmetaJson(): XRD = XRD(linkList)
return XRD(linkList)
}
@GetMapping("/host-meta.json", produces = ["application/json"]) @GetMapping("/host-meta.json", produces = ["application/json"])
fun hostmetaJson2(): XRD { fun hostmetaJson2(): XRD = XRD(linkList)
return XRD(linkList)
}
} }

View File

@ -28,12 +28,8 @@ class NodeinfoController(
) )
@GetMapping("/nodeinfo/2.0", produces = ["application/json"]) @GetMapping("/nodeinfo/2.0", produces = ["application/json"])
suspend fun nodeinfo2_0(): Nodeinfo2_0 { suspend fun nodeinfo2_0(): Nodeinfo2_0 = nodeinfoApplicationService.execute(NodeinfoRequest("2.0"), Anonymous)
return nodeinfoApplicationService.execute(NodeinfoRequest("2.0"), Anonymous)
}
@GetMapping("/nodeinfo/2.1", produces = ["application/json"]) @GetMapping("/nodeinfo/2.1", produces = ["application/json"])
suspend fun nodeinfo2_1(): Nodeinfo2_0 { suspend fun nodeinfo2_1(): Nodeinfo2_0 = nodeinfoApplicationService.execute(NodeinfoRequest("2.1"), Anonymous)
return nodeinfoApplicationService.execute(NodeinfoRequest("2.1"), Anonymous)
}
} }