dist/js/idbhelper.js
/**
   * Populate restaurants data without reviews (from P2 project)
   */
Populate restaurants data without reviews (from P2 project)
Populate restaurants data without reviews ( from P2 project )
static insertEachTransaction(restaurant, dbPromise) {
    dbPromise.then(db => {
      let tx = db.transaction('restaurants', 'readwrite');
      let store = tx.objectStore('restaurants');
      store.add(restaurant);
      return tx.complete;
    });
    console.log('item has been inserted');
    IDBHelper.populateReviews(restaurant.id, dbPromise);
  }
static insertEachTransaction ( restaurant , dbPromise ) { dbPromise . then ( db => { let tx = db . transaction ( 'restaurants' , 'readwrite' ) ; let store = tx . objectStore ( 'restaurants' ) ; store . add ( restaurant ) ; return tx . complete ; } ) ; console . log ( 'item has been inserted' ) ; IDBHelper . populateReviews ( restaurant . id , dbPromise ) ; }
Populate restaurants data without reviews (from P2 project)
Populate restaurants data without reviews ( from P2 project )