frindaddy / mixd

Cocktail portfolio/repository for sharing drink recipes between friends
0 stars 0 forks source link

Tweak updateDrink to use Mongoose update #36

Closed frindaddy closed 2 months ago

frindaddy commented 2 months ago

updateDrink() currently deletes the drink entry, then creates a new one. Not very clean or safe if the post fails after the delete. Change this to use the Mongoose update command like updating ingredients.

sidezbros commented 2 months ago

Didn't change to use the internal mongoose update function, but I fixed the bug that inspired this issue. There was a database ID collision error that has been corrected. This issue can be revisited if there are any other bugs with the current implementation.