mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: add fallback domain info
This commit is contained in:
1 parent
8fd23e6cea
commit
f466f1bb47
2 files changed
+2
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -521,6 +521,7 @@ export class Handler extends HandlerCommon {
|
||||
this.args.domainId = 'system';
|
||||
this.user = await user.getById('system', this.session.uid);
|
||||
if (!this.user) this.user = await user.getById('system', 0);
|
||||
this.domain = inferDomain || await domain.get('system');
|
||||
throw new NotFoundError(domainId);
|
||||
}
|
||||
this.UiContext.domainId = this.domainId;
|
||||
|
||||
Reference in new issue
Block a user