From 6c834f345f9a98a47588d2a52ffe1a7a7a3ee55d Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 3 Jun 2026 12:38:18 +0530 Subject: [PATCH] fetchhistory changes --- controller/fetchhistory.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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