framework: support providing api at namespace

This commit is contained in:
undefined committed 2025-08-20 17:08:11 +08:00
1 parent 5e72aee41b
commit 5e85f9c753
2 files changed
+9 -7

No files matched your search

+1 -1
View File
@@ -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 {