mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
framework: support providing api at namespace
This commit is contained in:
2 files changed
+9
-7
No files matched your search
@@ -95,7 +95,7 @@ function schemaToSettings(schema: Schema<any>) {
|
||||
if (s.meta?.role === 'password') flag |= FLAG_SECRET;
|
||||
const options = {};
|
||||
for (const item of actualList || []) {
|
||||
if (item.type !== 'const') throw new Error('List item must be a constant');
|
||||
if (item.type !== 'const') throw new Error(`List item must be a constant, got ${item.type}`);
|
||||
options[item.value] = item.meta?.description || item.value;
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user