diff --git a/controller/fetchhistory.js b/controller/fetchhistory.js index 40aa106..b28225a 100644 --- a/controller/fetchhistory.js +++ b/controller/fetchhistory.js @@ -3,7 +3,12 @@ const clickhouse = require('../database/clickhouse'); const fetchHistory = async (req, res) => { try { const { response_id } = req.body; - + if (!response_id) { + return res.status(400).json({ + success: false, + message: "response_id not found" + }); + } const rows = await clickhouse.query({ query: ` SELECT response_json