Fix typo and debug

This commit is contained in:
Apher 2026-07-01 18:24:42 +00:00
parent 4c0d5b13d1
commit e2b9fc1012

View File

@ -37,12 +37,14 @@ exports.getIntentCommand = async (req, res) => {
const intents = await Intent.findAll(); const intents = await Intent.findAll();
const intent = intents.find(intent => intent.description === text); const intent = intents.find(intent => intent.description === text);
print(intent, config.DEVICE_ID);
if (intent) { if (intent) {
const commandId = await redis.client.xAdd( const commandId = await redis.client.xAdd(
'communication', 'communication',
'*', '*',
{ {
device_id: device_id, device_id: config.DEVICE_ID,
command: intent.command, command: intent.command,
processed_at: new Date().toISOString(), processed_at: new Date().toISOString(),
source: config.DEVICE_ID, source: config.DEVICE_ID,