import Route from 'ember-route';
import RSVP from 'rsvp';
const { reject } = RSVP;

export default Route.extend({

  model() {
    let id = this.modelFor('dashboards').id;

    return this.store.findRecord('product', id).catch((jqXHR) => {
      if (jqXHR.status !== 404) {
        // Continue if the user does not have a subscription. We only show them Payout Settings
        return reject(jqXHR);
      }
    });
  }
});
