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
Matthew Dillon b12ff0eb20 ember-ajax
Fixes #37
Fixes #38
2015-11-12 13:32:41 -07:00

19 lines
427 B
JavaScript

import Ember from 'ember';
const { Controller, inject: { service } } = Ember;
export default Controller.extend({
session: service(),
globals: service(),
ajax: service(),
actions: {
submit: function(email) {
this.get('ajax').post('/users/lockout', { data: { email: email } } );
this.transitionToRoute('login');
this.get('flashMessages').information('Please check your email');
},
},
});