Closed nidamon closed 1 year ago
implemented new function, modularized 😎 (for MovieGenres), disregarding other edits as fundemental restructuring of code would be necessary.
Ok, I see it.
First part is done but second is not.
issues sorted, code has been modularized
app.js lines 185-187 these lines could be simplified into "Action: myFunction("Action"), where myFunction(myGenre) contains {urlData.filter(movie => movie.genre === myGenre).map(movie => movie.url) } especially in the case of adding more genres
app.js line 204 addUser and line 219 addMovie have very similar code (collection name and inserted object are the only differences) app.js line 303 getMovie could just call findMovie(url)._id