Browse Source

Fix orders in getTagsForUser

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

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

@ -22,29 +22,18 @@ export class TagService {
orderBy: {
name: 'asc'
},
include: {
orders: true
},
where: {
OR: [
{
orders: {
some: {
userId
}
}
userId
},
{
userId: null
}
]
},
include: {
orders: {
where: {
userId
},
select: {
id: true
}
}
}
});

Loading…
Cancel
Save