mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
core: fix #109
This commit is contained in:
1 parent
31f7d9a643
commit
b49a2fde74
4 files changed
+4
-4
No files matched your search
@@ -20,7 +20,7 @@ class RecordModel {
|
||||
const pending = await task.count({ uid });
|
||||
const timeRecent = await RecordModel.coll
|
||||
.find({ _id: { $gte: Time.getObjectID(moment().add(-1, 'hour')) }, uid }).project({ time: 1 }).toArray();
|
||||
return -(pending * (sum(timeRecent) / 1000));
|
||||
return -(pending * (sum(timeRecent.map((i) => i.time || 0)) / 1000));
|
||||
}
|
||||
|
||||
static async get(domainId: string, _id: ObjectID): Promise<Rdoc | null> {
|
||||
|
||||
Reference in new issue
Block a user