feat: add failed type and comment/remark

This commit is contained in:
Methapon2001 2024-12-13 11:17:59 +07:00
parent 1fef39729b
commit 4144a51df8

View file

@ -472,6 +472,8 @@ export class TaskActionController extends Controller {
step: number;
requestWorkId: string;
taskStatus: TaskStatus;
failedType?: string;
failedComment?: string;
}[],
) {
return await prisma.$transaction(async (tx) => {
@ -486,7 +488,11 @@ export class TaskActionController extends Controller {
if (!record) throw notFoundError("Task List");
return await tx.task.update({
where: { id: record.id },
data: { taskStatus: v.taskStatus },
data: {
taskStatus: v.taskStatus,
failedType: v.failedType,
failedComment: v.failedComment,
},
});
});
return await Promise.all(promises);