错误修复

This commit is contained in:
masnn committed 2020-05-29 20:00:40 +08:00
1 parent fff2172c38
commit 257d9814a9
15 files changed
+57 -63

No files matched your search

+2 -2
View File
@@ -73,7 +73,7 @@ class RecordConnectionHandler extends ConnectionHandler {
async message(msg) {
for (const rid of msg.rids) {
const rdoc = await record.get(rid); // eslint-disable-line no-await-in-loop
const rdoc = await record.get(this.domainId, rid); // eslint-disable-line no-await-in-loop
await this.onRecordChange({ value: rdoc }); // eslint-disable-line no-await-in-loop
}
}
@@ -88,7 +88,7 @@ class RecordConnectionHandler extends ConnectionHandler {
// eslint-disable-next-line prefer-const
let [udoc, pdoc] = await Promise.all([
user.getById(this.domainId, rdoc.uid),
problem.getById(this.domainId, rdoc.pid),
problem.get(this.domainId, rdoc.pid),
]);
if (pdoc.hidden && !this.user.hasPerm(PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;
this.send({ html: await this.renderHTML('record_main_tr.html', { rdoc, udoc, pdoc }) });