mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 修复nAccept计算异常的问题
This commit is contained in:
1 parent
4652ce86ab
commit
3f78c35359
4 files changed
+8
-17
No files matched your search
@@ -306,7 +306,7 @@ export async function setIfNotStatus<T extends keyof DocStatusType, K extends ke
|
||||
key: K, value: DocStatusType[T][K], ifNot: DocStatusType[T][K], args: Partial<DocStatusType[T]>,
|
||||
): Promise<DocStatusType[T]> {
|
||||
const current = await collStatus.findOne({ domainId, docType, docId, uid }) || {};
|
||||
if (current[key] === ifNot) return current;
|
||||
if (current[key] === ifNot) return null;
|
||||
const res = await collStatus.findOneAndUpdate(
|
||||
{ domainId, docType, docId, uid },
|
||||
{ $set: { [key]: value, ...args } },
|
||||
|
||||
Reference in new issue
Block a user