{"size": 276, "ext": "js", "max_stars_repo_path": "src/app/controller/ProfileController.js", "max_stars_repo_name": "TulioCaz/be_the_hero-api", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/app/controller/ProfileController.js", "max_issues_repo_name": "TulioCaz/be_the_hero-api", "max_issues_repo_issues_event_min_datetime": "2021-05-11T07:57:09.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-02T08:37:59.000Z", "max_forks_repo_path": "src/app/controller/ProfileController.js", "max_forks_repo_name": "TulioCaz/be_the_hero-api", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 19.7142857143, "max_line_length": 68, "alphanum_fraction": 0.6847826087}
import Incident from '../models/Incident';

class ProfileController {
  async index(req, res) {
    const ong_id = req.ongId;

    const incidents = await Incident.findAll({ where: { ong_id } });

    return res.json(incidents);
  }
}

export default new ProfileController();
