Fix undocumented issue with monk

This commit is contained in:
zkldi
2021-06-16 13:39:51 +01:00
parent d417ea8a4b
commit a7d8331d29
2 changed files with 6 additions and 2 deletions
@@ -13,11 +13,13 @@ export function GetOrSetUserLock(userID: integer) {
userID,
},
{
userID,
$set: { userID },
},
{
upsert: true,
returnDocument: "before",
// this is marked as deprecated, but it shouldn't be, as returnDocument: "before"
// does nothing.
returnOriginal: true,
}
);
}
+2
View File
@@ -14,6 +14,8 @@ export async function GetNextCounterValue(counterName: string): Promise<integer>
},
},
{
// this is marked as deprecated, but it shouldn't be, as returnDocument: "before"
// does nothing.
returnOriginal: true,
}
);