apps/manage-a-book-trading-club/app/controllers/requestsController.js
/*
 * pull the book from all Request.gives
 * pull the book from all Request.takes
 * hanlde invalid requests
 */
pull the book from all Request.gives
pull the book from all Request.takes
hanlde invalid requests
pull the book from all Request . gives pull the book from all Request . takes hanlde invalid requests
function handleDeletedBook(bookId) {
  return Request.update(
      { $or: [{ gives: bookId }, { takes: bookId }] },
      { $pull: { gives: bookId, takes: bookId } },
      { multi: true })
    .then(() => handleInvalidRequests());
}
function handleDeletedBook ( bookId ) { return Request . update ( { $or : [ { gives : bookId } , { takes : bookId } ] } , { $pull : { gives : bookId , takes : bookId } } , { multi : true } ) . then ( ( ) => handleInvalidRequests ( ) ) ; }
pull the book from all Request.gives
 pull the book from all Request.takes
 hanlde invalid requests
pull the book from all Request . gives pull the book from all Request . takes hanlde invalid requests