@@ -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)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user