/assets/?tags[]=foo&tags[]=bar
Get requests to endpoint above should return only those records that contain ALL of the provided tags (foo,bar)
My current attempt is returning any records that match ANY of the given tags.
const { tags } = req.query;
res.send(
await Asset.findAll({
where: whereOptions,
include: [
{ model: AssetMime },
{
model: Tag,
as: 'tags',
where: {
title: {
[Op.in]: tags,
},
},
},
],
})
);
How can I modify my filter to return records where ALL tags match?