This commit is contained in:
Víctor Losada Hernández
2026-11-03 19:23:51 +01:00
parent 798f14feba
commit 2eead59e78
+3 -3
View File
@@ -34,21 +34,21 @@ const tagConditions = (tagsAnd, tagsOr, tagsNot) => {
if(tagsAnd.length > 0) { if(tagsAnd.length > 0) {
conditions.tags = { conditions.tags = {
$all: tagsAnd.map(tag => tag.trim()) $all : tagsAnd.map((tag)=>tag.trim())
}; };
} }
if(tagsOr.length > 0) { if(tagsOr.length > 0) {
conditions.tags = { conditions.tags = {
...conditions.tags, ...conditions.tags,
$in: tagsOr.map(tag => tag.trim()) $in : tagsOr.map((tag)=>tag.trim())
}; };
} }
if(tagsNot.length > 0) { if(tagsNot.length > 0) {
conditions.tags = { conditions.tags = {
...conditions.tags, ...conditions.tags,
$nin: tagsNot.map(tag => tag.trim()) $nin : tagsNot.map((tag)=>tag.trim())
}; };
} }