Skip to content

Commit

Permalink
inject store into torii adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrpalek committed Feb 2, 2016
1 parent ffe5d01 commit 5da1249
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/torii-adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ import config from '../config/environment';
import Ember from 'ember';
import ajax from 'ember-ajax';

const { inject } = Ember;

export default Ember.Object.extend({ /**
* Resolve the user over the Github API using the token
* @param token API token (either from Cookie or Oauth)
* @return Promise
*/

store: inject.service(),

resolveUser (token) {
config.TMP_TORII_TOKEN = token;
return this.get('store').find('user', 'current').then((user) => {
Expand Down

0 comments on commit 5da1249

Please sign in to comment.