2103-USD / codalorians

0 stars 0 forks source link

Backend - DB Adapters [ Milestone Week 4 Part 1] #20

Closed alex-yambao closed 3 years ago

alex-yambao commented 3 years ago

Database Adapters destroyProduct destroyProduct({ id }) hard delete a product. make sure to delete all the order_products whose product is the one being deleted. make sure the orders for the order_products being deleted do not have a status = completed updateProduct updateProduct(product) don't try to update the id do update the other fields (name, description, etc) return the updated product updateUser updateUser(user) don't try to update the id do update the other fields (name, email, "isAdmin" etc) return the updated user