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
26c467f60f
commit
0e590ebe0d
4 files changed
+64
-214
No files matched your search
@@ -65,7 +65,9 @@ module.exports = {
|
||||
let result = await coll.deleteOne({ _id: tokenId, tokenType });
|
||||
return !!result.deletedCount;
|
||||
},
|
||||
|
||||
async getMostRecentSessionByUid(uid) {
|
||||
return await coll.findOne({ data: { uid }, token_type: this.TYPE_SESSION }, { sort: { updateAt: -1 } });
|
||||
},
|
||||
init: () => Promise.all([
|
||||
coll.createIndex([{ uid: 1 }, { tokenType: 1 }, { updateAt: -1 }], { sparse: true }),
|
||||
coll.createIndex('expireAt', { expireAfterSeconds: 0 })
|
||||
|
||||
Reference in new issue
Block a user