core: add fallback domain info

This commit is contained in:
undefined committed 2022-01-07 21:53:25 +08:00
1 parent 8fd23e6cea
commit f466f1bb47
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.3.0",
"version": "3.3.1",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+1
View File
@@ -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;