mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
优化domain.user存储结构
This commit is contained in:
1 parent
3eb593d134
commit
a93da2badb
17 files changed
+220
-239
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
import * as file from '../model/file';
|
||||
import * as problem from '../model/problem';
|
||||
import * as record from '../model/record';
|
||||
import * as domain from '../model/domain';
|
||||
import * as user from '../model/user';
|
||||
import * as solution from '../model/solution';
|
||||
import * as system from '../model/system';
|
||||
@@ -219,7 +220,7 @@ class ProblemSubmitHandler extends ProblemDetailHandler {
|
||||
const rid = await record.add(domainId, {
|
||||
uid: this.user._id, lang, code, pid: this.pdoc.docId,
|
||||
}, true);
|
||||
await user.incDomain(domainId, this.user._id, 'nSubmit');
|
||||
await domain.incUserInDomain(domainId, this.user._id, 'nSubmit');
|
||||
this.response.body = { rid };
|
||||
this.response.redirect = this.url('record_detail', { rid });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user