From b00885b0a4524b8c28eba24177598e625b30c96b Mon Sep 17 00:00:00 2001 From: baalmart Date: Thu, 24 Oct 2024 00:35:17 +0300 Subject: [PATCH] using the default tenant for the events insertion endpoint --- src/device-registry/controllers/create-event.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/device-registry/controllers/create-event.js b/src/device-registry/controllers/create-event.js index acb7b79d6f..38d99a108b 100644 --- a/src/device-registry/controllers/create-event.js +++ b/src/device-registry/controllers/create-event.js @@ -486,7 +486,6 @@ const createEvent = { addValues: async (req, res, next) => { try { logText("adding values..."); - const { tenant } = req.query; const measurements = req.body; const errors = extractErrorsFromRequest(req); if (errors) { @@ -502,7 +501,11 @@ const createEvent = { ? defaultTenant : req.query.tenant; - let result = await createEventUtil.insert(tenant, measurements, next); + let result = await createEventUtil.insert( + defaultTenant, + measurements, + next + ); if (isEmpty(result) || res.headersSent) { return;