Skip to content

Commit

Permalink
Merge pull request #939 from Chia-Network/revert-936-feat/metadata_ke…
Browse files Browse the repository at this point in the history
…y_fix

Revert "feat: remove meta_ prefix from metadata keys"
  • Loading branch information
MichaelTaylor3D authored Oct 11, 2023
2 parents 200d556 + 5ae708b commit 5a56ecb
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 5a56ecb

Please sign in to comment.