JuhoBjn / online-store

An online store made for a course project.
0 stars 1 forks source link

Check the user DB model update() function #51

Closed vaasuu closed 11 months ago

vaasuu commented 11 months ago

It should only change the things that are provided. It might be broken and set empty fields to null.

vaasuu commented 11 months ago

The code works as intended: it will set value to NULL in DB if the key matches but value is null, else it will update the value.

{first_name: "steve", last_name: undefined} -> will set first_name to steve and last_name to NULL in DB.