fetchhistory changes
Deploy Node App / deploy (push) Successful in 8s

This commit is contained in:
Gitea
2026-06-03 12:34:32 +05:30
parent 1892f6f94a
commit 83aadc472b
+3 -3
View File
@@ -2,17 +2,17 @@ const clickhouse = require('../database/clickhouse');
const fetchHistory = async (req, res) => { const fetchHistory = async (req, res) => {
try { try {
const { responseId } = req.body; const { response_id } = req.body;
const rows = await clickhouse.query({ const rows = await clickhouse.query({
query: ` query: `
SELECT response_json SELECT response_json
FROM userdetails.chat_history FROM userdetails.chat_history
WHERE response_id = {responseId:UInt64} WHERE response_id = {response_id:UInt64}
LIMIT 1 LIMIT 1
`, `,
query_params: { query_params: {
responseId: Number(responseId) response_id: Number(response_id)
} }
}); });