mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: use mongodb@6
This commit is contained in:
17 files changed
+64
-80
No files matched your search
@@ -45,8 +45,8 @@ export async function set(_id: string, value: any, broadcast = true) {
|
||||
{ $set: { value } },
|
||||
{ upsert: true, returnDocument: 'after' },
|
||||
);
|
||||
cache[_id] = res.value.value;
|
||||
return res.value.value;
|
||||
cache[_id] = res.value;
|
||||
return res.value;
|
||||
}
|
||||
|
||||
export async function inc<K extends NumberKeys<SystemKeys>>(_id: K) {
|
||||
@@ -55,8 +55,8 @@ export async function inc<K extends NumberKeys<SystemKeys>>(_id: K) {
|
||||
{ $inc: { value: 1 } as any },
|
||||
{ upsert: true, returnDocument: 'after' },
|
||||
);
|
||||
cache[_id] = res.value.value;
|
||||
return res.value.value;
|
||||
cache[_id] = res.value;
|
||||
return res.value;
|
||||
}
|
||||
|
||||
export async function runConfig() {
|
||||
|
||||
Reference in new issue
Block a user