1
0
forked from Yara724/api
This commit is contained in:
SepehrYahyaee
2026-04-26 09:31:50 +03:30
parent 6c2d178686
commit 4f8cb43883
5 changed files with 37 additions and 2 deletions

View File

@@ -325,6 +325,7 @@ export class ExpertBlameService {
if (w) {
w.locked = false;
delete w.lockedAt;
delete w.expiredAt;
delete w.lockedBy;
}
}
@@ -444,7 +445,11 @@ export class ExpertBlameService {
filter as any,
{
$set: { "workflow.locked": false },
$unset: { "workflow.lockedAt": "", "workflow.lockedBy": "" },
$unset: {
"workflow.lockedAt": "",
"workflow.expiredAt": "",
"workflow.lockedBy": "",
},
},
{ new: false },
);
@@ -953,6 +958,9 @@ export class ExpertBlameService {
$set: {
"workflow.locked": true,
"workflow.lockedAt": now,
"workflow.expiredAt": new Date(
now.getTime() + this.blameV2LockTtlMs,
),
"workflow.lockedBy": {
actorId: new Types.ObjectId(actorDetail.sub),
actorName: actorDetail.fullName || "Unknown Expert",
@@ -1125,6 +1133,7 @@ export class ExpertBlameService {
},
$unset: {
"workflow.lockedAt": "",
"workflow.expiredAt": "",
"workflow.lockedBy": "",
},
};
@@ -1308,6 +1317,7 @@ export class ExpertBlameService {
},
$unset: {
"workflow.lockedAt": "",
"workflow.expiredAt": "",
"workflow.lockedBy": "",
},
};
@@ -1450,6 +1460,7 @@ export class ExpertBlameService {
},
$unset: {
"workflow.lockedAt": "",
"workflow.expiredAt": "",
"workflow.lockedBy": "",
},
};