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: { orderBy: {
name: 'asc' name: 'asc'
}, },
include: {
orders: true
},
where: { where: {
OR: [ OR: [
{ {
orders: { userId
some: {
userId
}
}
}, },
{ {
userId: null userId: null
} }
] ]
},
include: {
orders: {
where: {
userId
},
select: {
id: true
}
}
} }
}); });

Loading…
Cancel
Save