From 9ec9ff9f7132e5eeaa1604bda385347e7e364532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 14 Apr 2021 11:07:15 +0200 Subject: [PATCH] :zap: Stringify tag IDs in GET /workflows --- packages/cli/src/Server.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index e24d1c242a..a0ee17ac70 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -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();