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