From 0b6051c188ff335bd6cf6e18a7da3d41af1a157e Mon Sep 17 00:00:00 2001 From: serefyarar Date: Wed, 27 Nov 2024 10:10:07 -0500 Subject: [PATCH] Update luma.js --- api/src/controllers/luma.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/controllers/luma.js b/api/src/controllers/luma.js index b7d81f2d..4d0eb781 100644 --- a/api/src/controllers/luma.js +++ b/api/src/controllers/luma.js @@ -49,13 +49,13 @@ export const createEvent = async (req, res, next) => { let payload = cleanPayload(req.body); // Check for duplicate events - const key = `processed_event:${payload.title}_${payload.start_time}`; - const exists = await redis.get(key); + const member = `${payload.title}_${payload.start_time}`; + const exists = await redis.hget(`processed_events`, member); if (exists) { return res.status(200).json({ status: 'rejected', message: 'Duplicate event, skipped processing' }); } - await redis.set(key, 'true'); - console.log(payload) + await redis.hset(`processed_events`, member, '1'); + const event = await composeDBService.createNode({ ...payload, });