mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: oauth: fix uid mapping
This commit is contained in:
1 parent
363db57ec4
commit
f186278a5a
2 files changed
+3
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "3.4.12",
|
||||
"version": "3.4.13",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -15,10 +15,10 @@ class OauthModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
static async set(_id: string, value: number) {
|
||||
static async set(_id: string, uid: number) {
|
||||
const res = await coll.findOneAndUpdate(
|
||||
{ _id },
|
||||
{ $set: { value } },
|
||||
{ $set: { uid } },
|
||||
{ upsert: true, returnDocument: 'after' },
|
||||
);
|
||||
return res.value?.uid;
|
||||
|
||||
Reference in new issue
Block a user