mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
注册功能
This commit is contained in:
1 parent
f259106aa3
commit
6e28dd868e
8 files changed
+55
-39
No files matched your search
@@ -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 });
|
||||
|
||||
Reference in new issue
Block a user