From 5ae708bee2762e10df5b38dfd0c0d06555763861 Mon Sep 17 00:00:00 2001 From: Michael Taylor <5665004+MichaelTaylor3D@users.noreply.github.com> Date: Wed, 11 Oct 2023 12:00:49 -0400 Subject: [PATCH] Revert "feat: remove meta_ prefix from metadata keys" --- src/controllers/organization.controller.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/controllers/organization.controller.js b/src/controllers/organization.controller.js index a2cd5dad..7ec3823f 100644 --- a/src/controllers/organization.controller.js +++ b/src/controllers/organization.controller.js @@ -385,15 +385,7 @@ export const getMetaData = async (req, res) => { where: { orgUid: req.query.orgUid }, }); - const rawMetadata = JSON.parse(organization.metadata); - const cleanedMetadata = {}; - - for (const [key, value] of Object.entries(rawMetadata)) { - const newKey = key.startsWith('meta_') ? key.substring(5) : key; - cleanedMetadata[newKey] = value; - } - - return res.json(cleanedMetadata); + return res.json(JSON.parse(organization.metadata)); } catch (error) { res.status(400).json({ message: 'Error getting metadata for organization',