Skip to content

Commit

Permalink
Merge branch 'main' of github.com:MixDrinks/backend-node
Browse files Browse the repository at this point in the history
  • Loading branch information
VovaStelmashchuk committed Sep 2, 2024
2 parents 134dd77 + afdeaeb commit 075acee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
15 changes: 0 additions & 15 deletions database/filetrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,28 +134,13 @@ async function buildFutureCounter(inputFilters, filterKey, collectionName) {
theFilterValue.push(filterValue.slug);
}

if (filterKey === 'alcohol-volume') {
console.log('1');
console.log(theFilterValue);

console.log('the fiter value ', filterValue.slug);
}

const futureFilter = { ...filters, [filterKey]: theFilterValue };

if (filterKey === 'alcohol-volume') {
console.log(futureFilter);
}

const futureSelectedFilterCount = Object.keys(futureFilter).reduce((acc, key) => acc + futureFilter[key].length, 0);
const isAddToIndex = futureSelectedFilterCount < 3;

const count = await getCocktailCountByFilter(futureFilter);

if (filterKey === 'alcohol-volume') {
console.log('count', count);
}

return {
id: filterValue.id,
query: filterToPath(futureFilter),
Expand Down
1 change: 0 additions & 1 deletion database/newclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const mongoUrl = process.env.DB_URL
const client = new MongoClient(mongoUrl, {
socketTimeoutMS: 10000,
connectTimeoutMS: 10000,
readPreference: 'nearest',
});

client.connect()
Expand Down

0 comments on commit 075acee

Please sign in to comment.