From 007069be82ca2e63bfeee61d557d0d9a21b8e3a8 Mon Sep 17 00:00:00 2001 From: Brian Runnells Date: Tue, 16 Jan 2018 08:51:43 -0600 Subject: [PATCH] use new imports in readme examples --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cb0cf43..f06a282 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,14 @@ Once you have a token, the authorizer will look like ```js // app/authorizers/github.js -import Ember from 'ember'; +import { inject as service } from '@ember/service'; +import { isEmpty } from '@ember/utils'; import Base from 'ember-simple-auth/authorizers/base'; export default Base.extend({ - session: Ember.inject.service(), + session: service(), authorize(sessionData, block) { - if (this.get('session.isAuthenticated') && !Ember.isEmpty(sessionData.access_token)) { + if (this.get('session.isAuthenticated') && !isEmpty(sessionData.access_token)) { block('Authorization', `token ${sessionData.access_token}`); } }