@belgoros wrote:
Is it possible to replace the below code with
async
andawait
:loadCurrentUser() { this.get('flashMessages').clearMessages(); if (this.get('session.isAuthenticated')) { return this.get('store').queryRecord('user', { me: true }).then((user) => { this.get('flashMessages').success(this.get('i18n').t('flash.signed_in')); this.set('user', user); }); } else { this.get('flashMessages').info(this.get('i18n').t('flash.signed_off')); return RSVP.resolve(); }
Thank you.
Posts: 1
Participants: 1