mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: 修复总是显示用户当前离线的问题
This commit is contained in:
1 parent
f9aef434cb
commit
de908236e3
2 files changed
+3
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.17.17",
|
||||
"version": "2.17.18",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
@@ -61,4 +61,4 @@
|
||||
"build": "tsc",
|
||||
"build:watch": "tsc --watch"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ export function getSessionListByUid(uid: number) {
|
||||
}
|
||||
|
||||
export async function getMostRecentSessionByUid(uid: number) {
|
||||
const res = await coll.find({ uid, tokenType: TYPE_SESSION }).sort('updateAt', -1);
|
||||
const res = await coll.find({ uid, tokenType: TYPE_SESSION }).sort('updateAt', -1).toArray();
|
||||
return res[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user