Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output - Merge persona params w/ response data #32

Open
jwils0n opened this issue Sep 5, 2018 · 4 comments
Open

Output - Merge persona params w/ response data #32

jwils0n opened this issue Sep 5, 2018 · 4 comments

Comments

@jwils0n
Copy link
Member

jwils0n commented Sep 5, 2018

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.

@akshat-g-07
Copy link

Hey @jwils0n,
I am new here. Wanna contribute to this issue.
Can you help me kinda onboard.

Thanks :).

@JeremyCroff
Copy link
Contributor

@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.

@akshat-g-07
Copy link

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 :)

@JeremyCroff
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants