Renames current-user service on application route to avoid conflict with legacy use of currentUser in various controllers

This commit is contained in:
Seyi Adebajo 2017-03-26 13:45:06 -07:00 committed by Mars Lan
parent 778147739b
commit 4ae3b06dba

View File

@ -11,7 +11,7 @@ const {
export default Route.extend(ApplicationRouteMixin, {
// Injected Ember#Service for the current user
currentUser: service(),
sessionUser: service('current-user'),
/**
* Attempt to load the current user
@ -38,7 +38,7 @@ export default Route.extend(ApplicationRouteMixin, {
* @private
*/
_loadCurrentUser() {
return get(this, 'currentUser')
return get(this, 'sessionUser')
.load()
.catch(() => get(this, 'session').invalidate());
},