some bug fix

This commit is contained in:
undefined committed 2020-07-03 22:54:07 +08:00
1 parent 57f711ed4f
commit fb5c29226b
11 files changed
+57 -44

No files matched your search

+2 -2
View File
@@ -28,7 +28,7 @@ async function add(tokenType, expireSeconds, data) {
updateAt: now,
expireAt: new Date(now.getTime() + expireSeconds * 1000),
});
return [str, res.ops];
return [str, res.ops[0]];
}
/**
@@ -109,7 +109,7 @@ global.Hydro.model.token = module.exports = {
get,
update,
del,
deleteByUid(uid) {
delByUid(uid) {
return coll.deleteMany({ uid });
},
getMostRecentSessionByUid(uid) {