mercredi 23 août 2017

After ember updates the login no longer works

After I have updated some versions, the login no longer works. I get the following error.

Anyone an idea why?

My package.json Updates

My Code in new.js:

let store = this.get('store');

 // Delete all existing sessions to avoid conflicts in the store
 store.destroyRecord('user_session');

 // Create new session object
 let userSession = store.createRecord('user_session', {
                email: this.get('email'),
                password: this.get('password')
 });

 // Save new session object (authentication on the server)
 userSession.save().then(
                () => {
                    // Authentication successful, store session and go to the dashboard
                    this.get('session').registerUserSession(userSession);
                    this.transitionToRoute('dashboard');
                },
                (e) => {
                    // Authentication failed
                    Ember.Logger.error('Login failed', e);

                    // TODO translate
                    this.get('toast').error('Login failed');
                }
 );




Aucun commentaire:

Enregistrer un commentaire