mirror of https://github.com/usbharu/Hideout.git
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
3bddfa854e
commit
8bb6b3d017
|
@ -7,7 +7,6 @@ class Nodeinfo {
|
||||||
protected constructor()
|
protected constructor()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Links {
|
class Links {
|
||||||
var rel: String? = null
|
var rel: String? = null
|
||||||
var href: String? = null
|
var href: String? = null
|
||||||
|
|
|
@ -31,6 +31,7 @@ data class User private constructor(
|
||||||
class UserBuilder(private val characterLimit: CharacterLimit, private val applicationConfig: ApplicationConfig) {
|
class UserBuilder(private val characterLimit: CharacterLimit, private val applicationConfig: ApplicationConfig) {
|
||||||
|
|
||||||
private val logger = LoggerFactory.getLogger(UserBuilder::class.java)
|
private val logger = LoggerFactory.getLogger(UserBuilder::class.java)
|
||||||
|
|
||||||
@Suppress("LongParameterList", "FunctionMinLength", "LongMethod")
|
@Suppress("LongParameterList", "FunctionMinLength", "LongMethod")
|
||||||
fun of(
|
fun of(
|
||||||
id: Long,
|
id: Long,
|
||||||
|
|
|
@ -19,7 +19,6 @@ interface InstanceService {
|
||||||
suspend fun createNewInstance(instanceCreateDto: InstanceCreateDto): Instance
|
suspend fun createNewInstance(instanceCreateDto: InstanceCreateDto): Instance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
class InstanceServiceImpl(
|
class InstanceServiceImpl(
|
||||||
private val instanceRepository: InstanceRepository,
|
private val instanceRepository: InstanceRepository,
|
||||||
|
@ -42,7 +41,6 @@ class InstanceServiceImpl(
|
||||||
val nodeinfo = objectMapper.readValue(nodeinfoJson, Nodeinfo::class.java)
|
val nodeinfo = objectMapper.readValue(nodeinfoJson, Nodeinfo::class.java)
|
||||||
val nodeinfoPathMap = nodeinfo.links.associate { it.rel to it.href }
|
val nodeinfoPathMap = nodeinfo.links.associate { it.rel to it.href }
|
||||||
|
|
||||||
|
|
||||||
for ((key, value) in nodeinfoPathMap) {
|
for ((key, value) in nodeinfoPathMap) {
|
||||||
when (key) {
|
when (key) {
|
||||||
"http://nodeinfo.diaspora.software/ns/schema/2.0" -> {
|
"http://nodeinfo.diaspora.software/ns/schema/2.0" -> {
|
||||||
|
|
Loading…
Reference in New Issue