This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/pods/login/controller.js
2015-06-05 08:35:44 -08:00

21 lines
618 B
JavaScript

import Ember from 'ember';
import LoginControllerMixin from 'simple-auth/mixins/login-controller-mixin';
export default Ember.Controller.extend(LoginControllerMixin, {
authenticator: 'simple-auth-authenticator:jwt',
loading: false,
actions: {
authenticate: function() {
this.set('errorMessage', null);
var _this = this;
this.set('loading', true);
this._super().then(function() {
_this.set('loading', false);
}, function(error) {
_this.set('loading', false);
var message = error.error;
_this.set('errorMessage', message);
});
}
}
});