0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-09 00:42:47 +00:00

more logs

This commit is contained in:
Víctor Losada Hernández
2024-05-23 14:08:37 +02:00
parent 058d70ed82
commit 609f5a3330

View File

@@ -55,7 +55,7 @@ const buildBrewsQuery = (legacy, v3) => {
const archive = { const archive = {
findBrews: async (req, res, next) => { findBrews: async (req, res, next) => {
try { try {
console.log(`Query as received in archive api:`); console.log(`Query as received in archive api for findBrews:`);
console.table(req.query); console.table(req.query);
const title = req.query.title || ''; const title = req.query.title || '';
@@ -91,6 +91,8 @@ const archive = {
} }
}, },
findTotal: async (req, res) => { findTotal: async (req, res) => {
console.log(`Query as received in archive api for totalBrews:`);
console.table(req.query);
try { try {
const title = req.query.title || ''; const title = req.query.title || '';
@@ -102,7 +104,7 @@ const archive = {
}; };
const totalBrews = await HomebrewModel.countDocuments(titleQuery); const totalBrews = await HomebrewModel.countDocuments(titleQuery);
console.log('when returning, totalbrews is ', totalBrews);
return res.json({ totalBrews }); return res.json({ totalBrews });
} catch (error) { } catch (error) {