Stringify tag IDs in GET /workflows

This commit is contained in:
Iván Ovejero 2021-04-14 11:07:15 +02:00
parent 47cc2b41af
commit 9ec9ff9f71

View file

@ -559,6 +559,11 @@ class App {
}
const results = await Db.collections.Workflow!.find(findQuery);
results.forEach(workflow => {
if (workflow.tags) {
workflow.tags = workflow.tags.map(({ id, name }) => ({ id: id.toString(), name }));
}
});
for (const entry of results) {
(entry as unknown as IWorkflowShortResponse).id = entry.id.toString();