{"size": 1947, "ext": "js", "max_stars_repo_path": "app_project/routes/app_project/site_assessments.js", "max_stars_repo_name": "CatalystNW/AVT", "max_stars_repo_stars_event_min_datetime": "2017-12-19T07:30:06.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-02T22:44:07.000Z", "max_issues_repo_path": "app_project/routes/app_project/site_assessments.js", "max_issues_repo_name": "dandahle/Catalyst-AppVetting", "max_issues_repo_issues_event_min_datetime": "2017-06-06T14:37:37.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-15T21:54:12.000Z", "max_forks_repo_path": "app_project/routes/app_project/site_assessments.js", "max_forks_repo_name": "CatalystNW/AVT", "max_forks_repo_forks_event_min_datetime": "2017-04-27T04:17:43.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-05T21:32:56.000Z"}
{"max_stars_count": 6, "max_issues_count": 191, "max_forks_count": 6, "avg_line_length": 69.5357142857, "max_line_length": 155, "alphanum_fraction": 0.8448895737}
// site_assessments.js - Route module for site_assessment

var express = require('express');
var router = express.Router();

const authHelper = require("../../controller/app_project/AuthHelper");

var assessment_controller = require('../../controller/app_project/assessment_controller.js');

router.get('/view', authHelper.checkLoggedInPages, authHelper.checkIfCanView, assessment_controller.view_site_assessments);
router.get('/view/app_id/:application_id', authHelper.checkLoggedInPages, authHelper.checkIfCanView, assessment_controller.view_site_assessment_by_app_id);
router.get('/view/:assessment_id', authHelper.checkLoggedInPages, authHelper.checkIfCanView, assessment_controller.view_site_assessment);

router.get('/transferred', authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.getTransferredAssessments);
router.get('/to_transfer', authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.getToTransferAssessments);
router.get('/applications', authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.getApplicationsInAssessment);

router.route('/:assessment_id')
  .get(authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.get_site_assessment)
  .patch(authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.edit_site_assessment);
router.patch('/:assessment_id/partners', authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.set_partners);

router.get('/paf_form/:assessment_id', authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.get_paf_page);
router.get('/handleit_form/:assessment_id', authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.get_handleit_form);

// router.get('/application/:application_id', authHelper.checkLoggedInAPI, authHelper.checkIfCanView, assessment_controller.getSiteAssessmentByAppId);

module.exports = router;