monster-ui
monster-ui copied to clipboard
Merge metadata into object's data
After KZOO-248 changes, some Monster-UI applications were broken because the information they use to know whether or not a user/account has X capability used to be included within the actual object's data (response.data), but now some of that information is being included outside of the object's data within a new field called metadata
(response.metadata).
This change aims to fix this issue by merging response.metadata
object into response.data
object, every time a non-listing request's response is received.
@azefiel Per @jamesaimonetti "What metadata is returned will depend on the doc, like account docs leak a bunch of fields, while others may not leak any extra."
@harenson I don't think these changes are now relevant. we have made changes in some of the apps where the changes to the API were made (5.2) and not all of them have the same structure. but after the changes per app that we made they are working as expected. Sorry, I didn't see this PR before.
No worries @pcandia. Thank you for taking care of it.