dist/js/idbhelper.js
/**
   * add new review in idb restaurant review
   */
add new review in idb restaurant review
add new review in idb restaurant review
static idbPostReview(id, body) {
    let key = parseInt(id);
    IDBHelper.dbPromise.then(async db => {
      const tx = db.transaction('restaurants', 'readwrite');
      const store = tx.objectStore('restaurants');
      let val = await store.get(key);
      val.reviews.push(body);
      store.put(val, key);
      return tx.complete;
    });
  }
static idbPostReview ( id , body ) { let key = parseInt ( id ) ; IDBHelper . dbPromise . then ( async db => { const tx = db . transaction ( 'restaurants' , 'readwrite' ) ; const store = tx . objectStore ( 'restaurants' ) ; let val = await store . get ( key ) ; val . reviews . push ( body ) ; store . put ( val , key ) ; return tx . complete ; } ) ; }
add new review in idb restaurant review
add new review in idb restaurant review