mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-17 03:28:43 +00:00
lint
This commit is contained in:
+7
-7
@@ -29,26 +29,26 @@ const rendererConditions = (legacy, v3)=>{
|
|||||||
return {}; // If all renderers selected, renderer field not needed in query for speed
|
return {}; // If all renderers selected, renderer field not needed in query for speed
|
||||||
};
|
};
|
||||||
|
|
||||||
const tagConditions = (tagsAnd, tagsOr, tagsNot) => {
|
const tagConditions = (tagsAnd, tagsOr, tagsNot)=>{
|
||||||
const conditions = {};
|
const conditions = {};
|
||||||
|
|
||||||
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())
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user