[+] Add "type" field to settings/get

pull/29/head
Azalea 2024-04-01 23:51:00 -04:00
parent 2d229b82c3
commit 44bab8c0c7
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import icu.samnyan.aqua.net.db.AquaNetUserRepo
import icu.samnyan.aqua.net.db.AquaUserServices
import org.springframework.web.bind.annotation.RestController
import kotlin.reflect.full.findAnnotation
import kotlin.reflect.jvm.jvmErasure
@RestController
@API("/api/v2/settings")
@ -22,7 +23,8 @@ class SettingsApi(
val fieldDesc = fields.map { (f, an) -> mapOf(
"key" to f.name,
"name" to an.name,
"desc" to an.desc
"desc" to an.desc,
"type" to f.returnType.jvmErasure.simpleName
) }
@API("get")