mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +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
@@ -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