Stringify tag IDs in PATCH /workflows/:id

This commit is contained in:
Iván Ovejero 2021-04-14 11:11:27 +02:00
parent 14368ccc63
commit b7804c0a77

View file

@ -674,10 +674,11 @@ class App {
await TagHelpers.createRelations(id, tagIds); await TagHelpers.createRelations(id, tagIds);
responseData.tags = await Db.collections.Tag!.find({ const foundTags = await Db.collections.Tag!.find({
select: ['id', 'name'], select: ['id', 'name'],
where: { id: In(tagIds) }, where: { id: In(tagIds) },
}); });
responseData.tags = foundTags.map(({ id, name }) => ({ id: id.toString(), name }));
} }