Kvasir-Movies / kvasir

Find a movie to watch amongst friends!
3 stars 0 forks source link

Refactor moviepreference #64

Open norseboar opened 4 years ago

norseboar commented 4 years ago

Pretty big change here.

Main difference is that a user's MoviePreferences are added at page load. All endpoints that query movies (search, explore, etc) all return Movie objects from TMDB.

Another change is that all MoviePreference CRUD APIs have been replaced with an upsert one. "Liking" a movie for the first time, vs changing a movie from "Like" to "Dislike" (or removing it entirely) all seem like similar operations from the UI, and there's a lot of overhead to need to figure out whether an action should cause an insert or update. We had no way to remove preferences, and I think that's probably ok long-term (our preferences can just keep track of a "neutral" state).