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 1 month ago

frindaddy commented 1 month 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 1 month 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.