mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
Hello airbnb
This commit is contained in:
1 parent
f9468536de
commit
8c195661d7
78 files changed
+2032
-1471
No files matched your search
@@ -1,9 +1,9 @@
|
||||
const
|
||||
db = require('../service/db.js'),
|
||||
coll = db.collection('blacklist');
|
||||
const db = require('../service/db.js');
|
||||
|
||||
const coll = db.collection('blacklist');
|
||||
|
||||
async function add(ip) {
|
||||
let expireAt = new Date(new Date().getTime() + 365 * 24 * 60 * 60 * 1000);
|
||||
const expireAt = new Date(new Date().getTime() + 365 * 24 * 60 * 60 * 1000);
|
||||
return coll.findOneAndUpdate({ _id: ip }, { $set: { expireAt } }, { upsert: true });
|
||||
}
|
||||
function get(ip) {
|
||||
|
||||
Reference in new issue
Block a user