add more calculator logic

This commit is contained in:
Quincy Larson
2015-06-24 09:44:30 -07:00
parent e2deaa3f9d
commit 09656a0f34
3 changed files with 248 additions and 2 deletions

View File

@@ -8,8 +8,7 @@ var async = require('async'),
R = require('ramda'),
_ = require('lodash'),
fs = require('fs'),
bootcampJson = require('./bootcamps.json'),
constantStrings = require('./constantStrings.json'),
User = require('../models/User'),
Challenge = require('./../models/Challenge'),
@@ -247,6 +246,8 @@ module.exports = {
);
},
nonprofits: function nonprofits(req, res) {
res.render('resources/nonprofits', {
title: 'A guide to our Nonprofit Projects'
@@ -277,6 +278,17 @@ module.exports = {
});
},
bootcampCalculator: function bootcampCalculator(req, res) {
res.render('resources/calculator', {
title: 'Coding Bootcamp Cost Calculator',
bootcampJson: bootcampJson
});
},
bootcampCalculatorJson: function bootcampCalculatorJson(req, res) {
res.send(bootcampJson);
},
unsubscribe: function unsubscribe(req, res, next) {
User.findOne({ email: req.params.email }, function(err, user) {
if (user) {