fix(auth): Fix merge errors from rebase

This commit is contained in:
Mrugesh Mohapatra
2017-07-20 14:57:08 +00:00
committed by Berkeley Martinez
parent 4ae52983f6
commit ab93109828
2 changed files with 4 additions and 23 deletions

View File

@ -177,9 +177,9 @@ module.exports = function(User) {
to: user.email, to: user.email,
from: 'team@freecodecamp.org', from: 'team@freecodecamp.org',
subject: 'Welcome to freeCodeCamp!', subject: 'Welcome to freeCodeCamp!',
protocol: isDev ? null : 'https', protocol: getProtocol(),
host: isDev ? devHost : 'freecodecamp.org', host: getHost(),
port: isDev ? null : 443, port: getPort(),
template: path.join( template: path.join(
__dirname, __dirname,
'..', '..',
@ -603,6 +603,7 @@ module.exports = function(User) {
from: getEmailSender(), from: getEmailSender(),
subject: 'freeCodeCamp - Authentication Request!', subject: 'freeCodeCamp - Authentication Request!',
text: renderAuthEmail({ text: renderAuthEmail({
host,
loginEmail, loginEmail,
loginToken loginToken
}) })
@ -621,11 +622,6 @@ module.exports = function(User) {
`; `;
}); });
}); });
return dedent`
If you entered a valid email, a magic link is on its way.
Please follow that link to sign in.
`;
}); });
}) })
.catch(err => { .catch(err => {

View File

@ -3,7 +3,6 @@ import moment from 'moment-timezone';
import { Observable } from 'rx'; import { Observable } from 'rx';
import debugFactory from 'debug'; import debugFactory from 'debug';
import emoji from 'node-emoji'; import emoji from 'node-emoji';
import uuid from 'node-uuid';
import { import {
frontEndChallengeId, frontEndChallengeId,
@ -423,20 +422,6 @@ module.exports = function(app) {
}); });
} }
function getEmailSignup(req, res) {
if (req.user) {
return res.redirect('/');
}
if (isSignUpDisabled) {
return res.render('account/beta', {
title: 'New sign ups are disabled'
});
}
return res.render('account/email-signup', {
title: 'Sign up for freeCodeCamp using your Email Address'
});
}
function getAccount(req, res) { function getAccount(req, res) {
const { username } = req.user; const { username } = req.user;
return res.redirect('/' + username); return res.redirect('/' + username);