ui: bug fixes

This commit is contained in:
undefined committed 2023-03-17 16:27:12 +08:00
1 parent b355a869b4
commit e78925c082
15 files changed
+76 -54

No files matched your search

+2
View File
@@ -44,6 +44,7 @@ export interface DocType {
export interface DocStatusType {
[TYPE_PROBLEM]: ProblemStatusDoc,
// FIXME: this need to be typed
[key: number]: any
}
@@ -396,6 +397,7 @@ export async function revPushStatus<T extends keyof DocStatusType>(
if (!res.value) {
res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid },
// @ts-ignore
{ $push: { [key]: value }, $inc: { rev: 1 } },
{ upsert: true, returnDocument: 'after' },
);