mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: cache uicontext.domain
This commit is contained in:
1 parent
43fb00e3c7
commit
e39a5fa87f
8 files changed
+71
-10
No files matched your search
@@ -3,6 +3,7 @@ import { cloneDeep, omit } from 'lodash';
|
||||
import type { KoaContext } from '@hydrooj/framework';
|
||||
import { randomPick, Time } from '@hydrooj/utils';
|
||||
import { PERM } from '../../model/builtin';
|
||||
import domain from '../../model/domain';
|
||||
import system from '../../model/system';
|
||||
import token from '../../model/token';
|
||||
|
||||
@@ -34,7 +35,7 @@ export default async (ctx: KoaContext, next: Next) => {
|
||||
UiContext.cdn_dynamic = system.get('server.cdn_dynamic');
|
||||
}
|
||||
UiContext.domainId = domainId;
|
||||
UiContext.domain = domainInfo;
|
||||
UiContext.domainVersion = domain.getVersion(domainInfo);
|
||||
ctx.HydroContext.UiContext = UiContext;
|
||||
ctx.HydroContext.domain = domainInfo;
|
||||
ctx.HydroContext.args = args;
|
||||
|
||||
Reference in new issue
Block a user