diff --git a/controller/fetchhistory.js b/controller/fetchhistory.js index 7ca0368..40aa106 100644 --- a/controller/fetchhistory.js +++ b/controller/fetchhistory.js @@ -2,17 +2,17 @@ const clickhouse = require('../database/clickhouse'); const fetchHistory = async (req, res) => { try { - const { responseId } = req.body; + const { response_id } = req.body; const rows = await clickhouse.query({ query: ` SELECT response_json FROM userdetails.chat_history - WHERE response_id = {responseId:UInt64} + WHERE response_id = {response_id:UInt64} LIMIT 1 `, query_params: { - responseId: Number(responseId) + response_id: Number(response_id) } });