mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 16:22:44 +00:00
"Removed console log statement in VaultPage.jsx and updated brewsQuery logic in vault.api.js to handle legacy and v3 filters"
This commit is contained in:
@@ -140,7 +140,6 @@ const VaultPage = (props) => {
|
||||
const v3 = v3Ref.current.checked != false;
|
||||
const legacy = legacyRef.current.checked != false;
|
||||
|
||||
console.log(author);
|
||||
if (update) {
|
||||
setTitle(title);
|
||||
setCount(count);
|
||||
|
||||
@@ -33,6 +33,8 @@ const handleErrorResponse = (res, error, functionName) => {
|
||||
};
|
||||
|
||||
const buildBrewsQuery = (legacy, v3) => {
|
||||
if (legacy === 'true' && v3 === 'true') return { published: true };
|
||||
|
||||
const renderers = [];
|
||||
if (legacy === 'true') renderers.push('legacy');
|
||||
if (v3 === 'true') renderers.push('V3');
|
||||
@@ -62,7 +64,7 @@ const vault = {
|
||||
const authorConditions = buildAuthorConditions(author, owner);
|
||||
|
||||
const combinedQuery = {
|
||||
$and: [brewsQuery, titleConditions, authorConditions]
|
||||
$and: [brewsQuery, titleConditions, authorConditions],
|
||||
};
|
||||
|
||||
const projection = {
|
||||
@@ -98,7 +100,7 @@ const vault = {
|
||||
const authorConditions = buildAuthorConditions(author, owner);
|
||||
|
||||
const combinedQuery = {
|
||||
$and: [brewsQuery, titleConditions, authorConditions]
|
||||
$and: [brewsQuery, titleConditions, authorConditions],
|
||||
};
|
||||
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user