|
@ -1,6 +1,7 @@ |
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
|
|
|
|
|
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
|
|
import { omit } from 'lodash'; |
|
|
|
|
|
|
|
|
@Injectable() |
|
|
@Injectable() |
|
|
export class TagService { |
|
|
export class TagService { |
|
@ -42,9 +43,8 @@ export class TagService { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
return tags.map((tag) => ({ |
|
|
return tags.map((tag) => ({ |
|
|
...tag, |
|
|
...omit(tag, '_count'), |
|
|
isUsed: tag._count.orders > 0, |
|
|
isUsed: tag._count.orders > 0 |
|
|
_count: undefined |
|
|
|
|
|
})); |
|
|
})); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|