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/users/requestlockouthelp/controller.js
2015-10-27 16:17:18 -07:00

21 lines
583 B
JavaScript

import Ember from 'ember';
import ajaxRequest from '../../../utils/ajax-request';
export default Ember.Controller.extend({
session: Ember.inject.service('session'),
actions: {
save: function() {
let url = `${this.get('globals.apiURL')}/api/${this.get('globals.genus')}/users/lockout`;
let options = {
method: 'POST',
data: { email: this.get('email') },
};
ajaxRequest(url, options, this.get('session'));
this.transitionToRoute('login');
this.get('flashMessages').information('Please check your email');
},
},
});