core: oauth: fix uid mapping

This commit is contained in:
undefined committed 2022-02-09 19:57:08 +08:00
1 parent 363db57ec4
commit f186278a5a
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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;