Personal database that houses and allows a user to edit movies watched, plot, genre, personal rating and more. Utilizes pair programming, HTML, CSS, Javascript, JQuery (Ajax) and JSON databases.
function edit(id, data) {
console.log({id, data});
return $.ajax({
url: `${URL}/${id}`,
type: 'PATCH',
data
})
}
- allows the user to edit their favorite movies and add to their list.
function createMovie(body) {
return $.post(URL, body).then(loadMovies);
}
function deleteMovie(id) {
return $.ajax({
url: `${URL}/${id}`,
type: 'DELETE'
}).then(loadMovies)
}
function filterMovies() {
const input = $(this).val()
const matching = allMovies.filter(movie => {
return movie.title.toLowerCase().includes(input.toLowerCase())
})
showMovies(matching)
}
- Filters out movies base on user input
- debounced so that in only runs when the user is finished typing
Radio({
name: 'rating',
icon: 'fa-star',
defaultValue: 1,
length: 5
})