{"size": 644, "ext": "js", "max_stars_repo_path": "routes/register.js", "max_stars_repo_name": "nrcalero/Language-Learners", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "routes/register.js", "max_issues_repo_name": "nrcalero/Language-Learners", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "routes/register.js", "max_forks_repo_name": "nrcalero/Language-Learners", "max_forks_repo_forks_event_min_datetime": "2018-02-13T04:02:41.000Z", "max_forks_repo_forks_event_max_datetime": "2018-02-28T16:20:39.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 4, "avg_line_length": 28.0, "max_line_length": 57, "alphanum_fraction": 0.6692546584}
var fs = require('fs');
var interests = require('../Interests.json');
var difficulty = require('../Difficulty.json');

/*
 * GET Register page.
 */

exports.view = function (req, res) {
	console.log(interests.Interests.length);
	for (var i = 0; i < interests.Interests.length; ++i) {
		interests.Interests[i].enabled = null;
	}
	for (var i = 1; i < difficulty.Difficulty.length; ++i) {
		difficulty.Difficulty[i].enabled = null;
	}
	var json = JSON.stringify(interests, null, 2);
  	fs.writeFile('Interests.json', json);
 	var json2 = JSON.stringify(difficulty, null, 2);
  	fs.writeFile('Difficulty.json', json2);
  res.render('register');
};
