mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: optimize schema display
This commit is contained in:
1 parent
6f862657dc
commit
b1b933f3d7
4 files changed
+8
-4
No files matched your search
@@ -186,9 +186,13 @@ class SystemSettingHandler extends SystemHandler {
|
||||
class SystemConfigHandler extends SystemHandler {
|
||||
async get() {
|
||||
this.response.template = 'manage_config.html';
|
||||
let value = configSource;
|
||||
try {
|
||||
value = yaml.dump(Schema.intersect(SystemSettings)(yaml.load(configSource)));
|
||||
} catch (e) { }
|
||||
this.response.body = {
|
||||
schema: Schema.intersect(SystemSettings).toJSON(),
|
||||
value: configSource,
|
||||
value,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user