Browse Source

Destructure tags map in tag.service

pull/3859/head
Matej Gerek 11 months ago
committed by Thomas Kaul
parent
commit
783d90240f
  1. 7
      apps/api/src/services/tag/tag.service.ts

7
apps/api/src/services/tag/tag.service.ts

@ -42,9 +42,10 @@ export class TagService {
} }
}); });
return tags.map((tag) => ({ return tags.map(({ _count, id, name }) => ({
...omit(tag, '_count'), id,
isUsed: tag._count.orders > 0 name,
isUsed: _count.orders > 0
})); }));
} }
} }

Loading…
Cancel
Save