Removing needless CDN call, optimizing account view for slow page loads
This commit is contained in:
@ -158,17 +158,8 @@ exports.postEmailSignup = function(req, res, next) {
|
||||
*/
|
||||
|
||||
exports.getAccount = function(req, res) {
|
||||
Challenge.find({}, null, { sort: { challengeNumber: 1 } }, function(err, c) {
|
||||
if (err) {
|
||||
console.error('Challenge err: ', err);
|
||||
next(err);
|
||||
}
|
||||
res.render('account/account', {
|
||||
title: 'Manage your Free Code Camp Account',
|
||||
challenges: c,
|
||||
ch: req.user.challengesHash,
|
||||
moment: moment
|
||||
});
|
||||
title: 'Manage your Free Code Camp Account'
|
||||
});
|
||||
};
|
||||
|
||||
@ -177,15 +168,9 @@ exports.getAccount = function(req, res) {
|
||||
*/
|
||||
|
||||
exports.getAccountAngular = function(req, res) {
|
||||
Challenge.find({}, null, { sort: { challengeNumber: 1 } }, function(err, c) {
|
||||
if (err) {
|
||||
console.error('Challenge err: ', err);
|
||||
next(err);
|
||||
}
|
||||
res.json({
|
||||
user: req.user
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -4,10 +4,8 @@ html(ng-app='profileValidation', lang='en')
|
||||
script(src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js")
|
||||
script(src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.min.js")
|
||||
script(src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js")
|
||||
link(rel='shortcut icon', href='//s3.amazonaws.com/freecodecamp/favicon.ico')
|
||||
link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css')
|
||||
link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css')
|
||||
link(rel='stylesheet', href='//code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css')
|
||||
include partials/meta
|
||||
title #{title} | Free Code Camp
|
||||
meta(charset='utf-8')
|
||||
|
Reference in New Issue
Block a user