Implementing persisting action result mutations

This commit is contained in:
Thaum Rystra
2024-04-02 17:46:31 +02:00
parent 2cbfc5d099
commit 1fb1eb83c7
15 changed files with 285 additions and 144 deletions

View File

@@ -0,0 +1,13 @@
import { Mutation } from '/imports/api/engine/action/tasks/TaskResult';
export default function mutationToLogUpdates(mutation: Mutation) {
if (!mutation.contents) return [];
const contents: any[] = [];
for (const content of mutation.contents) {
contents.push({
...content,
targetIds: mutation.targetIds,
});
}
return contents;
}