注册功能

This commit is contained in:
masnn committed 2020-04-09 20:47:23 +08:00
1 parent f259106aa3
commit 6e28dd868e
8 files changed
+55 -39

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = {
let begin_at = new Date(cur_time - cur_time % (period_secs * 1000));
let expire_at = new Date(begin_at.getTime() + period_secs * 1000);
try {
await coll.find_one_and_update({
await coll.findOneAndUpdate({
ident, begin_at, expire_at,
op: { $not: { $gte: max_operations } }
}, { $inc: { op: 1 } }, { upsert: true });