Below is my code to add reviews to my reviews array in the restaurant object
async created (restaurantId, title, reviewer, rating, dateOfReview, review) {
const restaurantsCollection = await restaurants();
let newReview = {
restaurantId : restaurantId,
title : title,
reviewer : reviewer,
rating : rating,
dateOfReview : dateOfReview,
review : review
};
const restaurant = await restaurantsCollection.findOne({ _id: restaurantId });
restaurant.reviews.push(newReview);
}
This does not add any data to the DB, what is the right way to do this?