{"size": 581, "ext": "js", "max_stars_repo_path": "frontend/app/pods/data-references/databases/all/controller.js", "max_stars_repo_name": "sahilpaudel/AfterGlow", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "frontend/app/pods/data-references/databases/all/controller.js", "max_issues_repo_name": "sahilpaudel/AfterGlow", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "frontend/app/pods/data-references/databases/all/controller.js", "max_forks_repo_name": "sahilpaudel/AfterGlow", "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": 26.4090909091, "max_line_length": 100, "alphanum_fraction": 0.6230636833}
import Ember from 'ember';
import { CanMixin } from 'ember-can';

export default Ember.Controller.extend( CanMixin, {

  canEdit: Ember.computed(function(){
    return this.can('edit question');
  }),
  databases: Ember.computed.alias('model'),
  actions: {
    syncDatabase(database){
      database.sync().then((response)=>{
        this.get('toast').success(
          'Databse Sync was successfully initiated. Please wait for few minutes for it to complete',
          'YaY!',
          {closeButton: true, timeout: 15000, progressBar:false}
        );
      });
    }
  }
});
