mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
错误修复
This commit is contained in:
1 parent
fff2172c38
commit
257d9814a9
15 files changed
+57
-63
No files matched your search
@@ -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 }) });
|
||||
|
||||
Reference in new issue
Block a user