core&ui: add setting provider

This commit is contained in:
undefined committed 2024-01-15 15:58:28 +08:00
1 parent 886fa6821d
commit 5d2ac74b04
10 files changed
+56 -28

No files matched your search

+4
View File
@@ -315,6 +315,10 @@ export class SettingService extends Service {
constructor(ctx: Context) {
super(ctx, 'setting', true);
}
get(key: string) {
return (this.caller ? this.caller.domain?.config?.[key.replace(/\./g, '$')] : null) ?? global.Hydro.model.system.get(key);
}
}
export async function apply(ctx: Context) {