diff --git a/seed/challenges/03-back-end-development-certification/api-projects.json b/seed/challenges/03-back-end-development-certification/api-projects.json
index fd89e3bc93..b9ac93c83d 100644
--- a/seed/challenges/03-back-end-development-certification/api-projects.json
+++ b/seed/challenges/03-back-end-development-certification/api-projects.json
@@ -252,7 +252,7 @@
"id": "bd7158d8c443edefaeb5bd0e",
"title": "URL Shortener Microservice",
"description": [
- "Objective: Build a full stack JavaScript app that is functionally similar to this: https://shurli.herokuapp.com/ and deploy it to Heroku.",
+ "Objective: Build a full stack JavaScript app that is functionally similar to this: https://little-url.herokuapp.com/ and deploy it to Heroku.",
"Note that for each project, you should create a new GitHub repository and a new Heroku project. If you can't remember how to do this, revisit http://freecodecamp.com/challenges/get-set-for-our-back-end-development-projects.",
"Here are the specific user stories you should implement for this project:",
"User Story: I can pass a URL as a parameter and I will receive a shortened URL in the JSON response.",
@@ -271,7 +271,7 @@
"challengeType": 4,
"titleEs": "Microservicio para acortar URLs",
"descriptionEs": [
- "Objetivo: Desarrolla una aplicación de Pila Completa en JavaScript que sea funcionalmente similar a esta: https://shurli.herokuapp.com/ y despliegala en Heroku.",
+ "Objetivo: Desarrolla una aplicación de Pila Completa en JavaScript que sea funcionalmente similar a esta: https://little-url.herokuapp.com/ y despliegala en Heroku.",
"Ten en cuenta que para cada proyecto, deberías crear un nuevo repositorio en GitHub y un nuevo proyecto en Heroku. Si no recuerdas como hacer esto, vuelve a visitar http://freecodecamp.com//challenges/get-set-for-our-back-end-development-projects.",
"Aquí están las historias de usuario específicas que debes implementar para este proyecto:",
"Historia de Usuario: Puedo pasar una URL como parámetro y recibiré una URL acortada en la respuesta JSON.",
diff --git a/server/boot/randomAPIs.js b/server/boot/randomAPIs.js
index fde4cfb179..2995082fb2 100644
--- a/server/boot/randomAPIs.js
+++ b/server/boot/randomAPIs.js
@@ -292,6 +292,13 @@ module.exports = function(app) {
req.checkParams('email', 'Must send a valid email').isEmail();
return User.findOne({ where: { email: req.params.email } }, (err, user) => {
if (err) { return next(err); }
+ if (!user) {
+ req.flash('info', {
+ msg: 'Email address not found. ' +
+ 'Please update your Email preferences from your profile.'
+ });
+ return res.redirect('/map');
+ }
return user.updateAttribute('sendMonthlyEmail', false, (err) => {
if (err) { return next(err); }
req.flash('info', {
@@ -306,6 +313,13 @@ module.exports = function(app) {
req.checkParams('email', 'Must send a valid email').isEmail();
return User.findOne({ where: { email: req.params.email } }, (err, user) => {
if (err) { return next(err); }
+ if (!user) {
+ req.flash('info', {
+ msg: 'Email address not found. ' +
+ 'Please update your Email preferences from your profile.'
+ });
+ return res.redirect('/map');
+ }
return user.updateAttribute('sendNotificationEmail', false, (err) => {
if (err) { return next(err); }
req.flash('info', {
@@ -320,6 +334,13 @@ module.exports = function(app) {
req.checkParams('email', 'Must send a valid email').isEmail();
return User.findOne({ where: { email: req.params.email } }, (err, user) => {
if (err) { return next(err); }
+ if (!user) {
+ req.flash('info', {
+ msg: 'Email address not found. ' +
+ 'Please update your Email preferences from your profile.'
+ });
+ return res.redirect('/map');
+ }
return user.updateAttribute('sendQuincyEmail', false, (err) => {
if (err) { return next(err); }
req.flash('info', {