import injectService from 'ember-service/inject';
import Adapter from 'ember-data/adapter';

const UNREAD_URL = '/v1/unread';

export default Adapter.extend({
  imApi: injectService(),

  // TODO: Remove, see https://git-aws.internal.justin.tv/web/web-client/issues/698
  shouldReloadAll() {
    return true;
  },

  query() {
    return this.get('imApi').makeRequest('GET', UNREAD_URL);
  }
});
