{"size": 462, "ext": "js", "max_stars_repo_path": "app/controllers/login.js", "max_stars_repo_name": "yechielby/BUYME-Ember", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/controllers/login.js", "max_issues_repo_name": "yechielby/BUYME-Ember", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/controllers/login.js", "max_forks_repo_name": "yechielby/BUYME-Ember", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.3157894737, "max_line_length": 78, "alphanum_fraction": 0.5995670996}
import Controller from '@ember/controller';
import { inject } from '@ember/service';

export default Controller.extend({
  email: null,
  password: null,
  session: inject(),
  actions: {
    authenticate() {
      this.get('session').authenticate(this.get('email'),this.get('password'))
      .then( ()=> {
        this.transitionToRoute('tasks');
      }, (err)=> {
        alert(err.responseText  ? err.responseText : err.toString());
      });
    }
  }
});
