saloon
saloon copied to clipboard
Output - Merge persona params w/ response data
Sometimes, params passed into an API don't get returned (passwords). They still might be useful in the output, though. So instead of simply adding the response to the output, let's merge it on top of the persona params.
Hey @jwils0n, I am new here. Wanna contribute to this issue. Can you help me kinda onboard.
Thanks :).
@akshat-g-07 Check out this line of code where the output is built: https://github.com/intuit/saloon/blob/master/src/seeder.js#L104 You can see it's only inserting the response data, but not any persona(resource) params.
When contributing always make sure it's not a breaking change for existing users, unless absolutely necessary, and then it would need appropriate versioning.
Hey @JeremyCroff , Thanks for the informative reply. And sorry for replying late I was stuck with some personal things.
As per my understanding, the steps I need to follow are: 1.) In _saveSuccess, I need to add the persona as a parameter. 2.) Pass the required/desired properties of persona to insert function. 3.) Update the insert accordingly here.
Please let me know if I am coming in the right direction. If yes, then I will start this right away. If no, can you please steer me on the right path.
Thanks :)
Hey @JeremyCroff , Thanks for the informative reply. And sorry for replying late I was stuck with some personal things.
As per my understanding, the steps I need to follow are: 1.) In _saveSuccess, I need to add the persona as a parameter. 2.) Pass the required/desired properties of persona to insert function. 3.) Update the insert accordingly here.
Please let me know if I am coming in the right direction. If yes, then I will start this right away. If no, can you please steer me on the right path.
Thanks :)
The resource param should be the persona data! You should be able to confirm by running it locally