Closed nathom closed 11 months ago
Overall Project | 76.53% | :green_apple: |
---|---|---|
Files changed | 100% | :green_apple: |
File | Coverage | |
---|---|---|
MongoDBRecipeRepository.java | 96.56% | :green_apple: |
Thanks for the change. We cannot rely on id here for URL generation, because there is no real "id" there. id
is just index number of recipe list, so it can be changed when something is deleted. (this was one of the decisions we made from MS1)
I can reproduce the issue as you described. The reason of this issue was at updateRecipe(id, recipe)
method in CachedRecipeModel
. We cached updated recipe there and missed copying over getSharedUrl()
from originalRecipe. Can you check that part and update the PR?
Ok no worries. I'll make a new PR with the fix
Previously, if the recipe was edited the UUID would be regenerated in some cases, invalidating previously shared URLs. This change makes the UUID a function of the recipe ID and recipe title (both of which are invariant) so that the same URL will always be generated for a given recipe.