update non-profit route

pull/2/head
Michael Q Larson 2014-10-26 09:22:53 -07:00
parent 28d1468267
commit 2387e00ca8
4 changed files with 8 additions and 8 deletions

4
app.js
View File

@ -149,8 +149,8 @@ app.get('/reset/:token', userController.getReset);
app.post('/reset/:token', userController.postReset); app.post('/reset/:token', userController.postReset);
app.get('/signup', userController.getSignup); app.get('/signup', userController.getSignup);
app.post('/signup', userController.postSignup); app.post('/signup', userController.postSignup);
app.get('/contact', contactController.getContact); app.get('/non-profits', contactController.getContact);
app.post('/contact', contactController.postContact); app.post('/non-profits', contactController.postContact);
app.get('/account', passportConf.isAuthenticated, userController.getAccount); app.get('/account', passportConf.isAuthenticated, userController.getAccount);
app.post('/account/profile', passportConf.isAuthenticated, userController.postUpdateProfile); app.post('/account/profile', passportConf.isAuthenticated, userController.postUpdateProfile);
app.post('/account/password', passportConf.isAuthenticated, userController.postUpdatePassword); app.post('/account/password', passportConf.isAuthenticated, userController.postUpdatePassword);

View File

@ -36,13 +36,13 @@ exports.postContact = function(req, res) {
if (errors) { if (errors) {
req.flash('errors', errors); req.flash('errors', errors);
return res.redirect('/contact'); return res.redirect('/non-profits');
} }
var from = req.body.email; var from = req.body.email;
var name = req.body.name; var name = req.body.name;
var body = req.body.message; var body = req.body.message;
var to = 'quincy@courseforward.com'; var to = 'michaelqlarson@gmail.com';
var subject = 'Free Code Camp'; var subject = 'Free Code Camp';
var mailOptions = { var mailOptions = {
@ -55,9 +55,9 @@ exports.postContact = function(req, res) {
transporter.sendMail(mailOptions, function(err) { transporter.sendMail(mailOptions, function(err) {
if (err) { if (err) {
req.flash('errors', { msg: err.message }); req.flash('errors', { msg: err.message });
return res.redirect('/contact'); return res.redirect('/non-profits');
} }
req.flash('success', { msg: 'Email has been sent successfully!' }); req.flash('success', { msg: 'Email has been sent successfully!' });
res.redirect('/contact'); res.redirect('/non-profits');
}); });
}; };

View File

@ -2,7 +2,7 @@ extends layout
block content block content
.jumbotron .jumbotron
h1.animated.lightSpeedIn.text-center We'll help you do things faster and better with custom software! h1.animated.lightSpeedIn.text-center We'll code software solutions for your non-profit, for free!
.animated.fadeIn.delay-2.landing-panel-body .animated.fadeIn.delay-2.landing-panel-body
h3 Our students will help you build that donor tracking system, community message board, or whatever your organization needs,  h3 Our students will help you build that donor tracking system, community message board, or whatever your organization needs, 
strong at no cost. strong at no cost.

View File

@ -28,7 +28,7 @@ block content
a.btn.btn-cta.btn-primary(href="/login") Sign in now to start coding (it's free) a.btn.btn-cta.btn-primary(href="/login") Sign in now to start coding (it's free)
br br
br br
a.btn.non-profit-cta.btn-success(href="/contact") I'm with a non-profit and need something coded up a.btn.non-profit-cta.btn-success(href="/non-profits") I'm with a non-profit and need something coded up
br br
.panel.panel-primary .panel.panel-primary
.panel-heading.landing-panel-heading Frequently Asked Questions .panel-heading.landing-panel-heading Frequently Asked Questions