Skip to content

Commit

Permalink
Revert "feat: remove meta_ prefix from metadata keys"
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D authored Oct 11, 2023
1 parent 200d556 commit 5ae708b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/controllers/organization.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 5ae708b

Please sign in to comment.