parent
e54c6fcb2f
commit
b12ff0eb20
7 changed files with 34 additions and 51 deletions
|
@ -1,20 +1,15 @@
|
|||
import Ember from 'ember';
|
||||
import ajaxRequest from '../../../utils/ajax-request';
|
||||
|
||||
const { Controller, inject: { service } } = Ember;
|
||||
|
||||
export default Controller.extend({
|
||||
session: service(),
|
||||
globals: service(),
|
||||
ajax: service(),
|
||||
|
||||
actions: {
|
||||
submit: function(email) {
|
||||
const url = `${this.get('globals.apiURL')}/api/${this.get('globals.genus')}/users/lockout`;
|
||||
const options = {
|
||||
method: 'POST',
|
||||
data: { email: email },
|
||||
};
|
||||
ajaxRequest(url, options, this.get('session'));
|
||||
this.get('ajax').post('/users/lockout', { data: { email: email } } );
|
||||
this.transitionToRoute('login');
|
||||
this.get('flashMessages').information('Please check your email');
|
||||
},
|
||||
|
|
Reference in a new issue