mirror of https://github.com/hykilpikonna/AquaDX
[+] Add "type" field to settings/get
parent
2d229b82c3
commit
44bab8c0c7
|
@ -7,6 +7,7 @@ import icu.samnyan.aqua.net.db.AquaNetUserRepo
|
||||||
import icu.samnyan.aqua.net.db.AquaUserServices
|
import icu.samnyan.aqua.net.db.AquaUserServices
|
||||||
import org.springframework.web.bind.annotation.RestController
|
import org.springframework.web.bind.annotation.RestController
|
||||||
import kotlin.reflect.full.findAnnotation
|
import kotlin.reflect.full.findAnnotation
|
||||||
|
import kotlin.reflect.jvm.jvmErasure
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@API("/api/v2/settings")
|
@API("/api/v2/settings")
|
||||||
|
@ -22,7 +23,8 @@ class SettingsApi(
|
||||||
val fieldDesc = fields.map { (f, an) -> mapOf(
|
val fieldDesc = fields.map { (f, an) -> mapOf(
|
||||||
"key" to f.name,
|
"key" to f.name,
|
||||||
"name" to an.name,
|
"name" to an.name,
|
||||||
"desc" to an.desc
|
"desc" to an.desc,
|
||||||
|
"type" to f.returnType.jvmErasure.simpleName
|
||||||
) }
|
) }
|
||||||
|
|
||||||
@API("get")
|
@API("get")
|
||||||
|
|
Loading…
Reference in New Issue