Send Edited Recipe JSON in Request Body #123
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently, when a user wants to pack an edited recipe , we upload the edited recipe to firebase, pass that reference to the server, and then the server retrieves the recipe from firebase. To minimize firebase calls and improve efficiency of the client, we're changing that flow to instead send the edited recipe JSON as the body of the packing request to the server.
Part of this ticket
Solution
For edited recipes, don't send a recipe URL param and send the recipe JSON in the body of the POST request to the server.
Depends on this cellpack ticket, since the server currently only accepts firebase paths and local file paths to recipes
Once the above cellpack ticket is merged, we will need to redeploy the server and update the API gateway to pass the body along.
DON'T MERGE until the above server steps have been completed!! Packing editable recipes won't work with this code until those steps are complete!!!