mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: add setting provider
This commit is contained in:
10 files changed
+56
-28
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user