Skip to content

Commit

Permalink
Fixes a few incorrect comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mcauser committed Jan 22, 2014
1 parent 8738308 commit f2d9aae
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/services/github.js
Expand Up @@ -28,7 +28,7 @@ exports.authenticateUser = function(req, res, next, callback)
// Set placeholder variables to hold our data // Set placeholder variables to hold our data
var data = { var data = {
githubUser: false, // Github user githubUser: false, // Github user
sydjsUser: false // GitHub user sydjsUser: false // SydJS user
} }


// Initalise GitHub credentials // Initalise GitHub credentials
Expand Down Expand Up @@ -92,10 +92,10 @@ exports.authenticateUser = function(req, res, next, callback)


} }


// Function to create GitHub user // Function to create SydJS user
var createSydjsUser = function() { var createSydjsUser = function() {


console.log('[services.github] - Creating GitHub user...'); console.log('[services.github] - Creating SydJS user...');
console.log('------------------------------------------------------------'); console.log('------------------------------------------------------------');


// Define data // Define data
Expand All @@ -116,23 +116,23 @@ exports.authenticateUser = function(req, res, next, callback)
website: data.githubUser.profile._json.blog website: data.githubUser.profile._json.blog
}; };


console.log('[services.github] - GitHub user create data:', userData ); console.log('[services.github] - SydJS user create data:', userData );


// Create user // Create user
data.sydjsUser = new User.model(userData); data.sydjsUser = new User.model(userData);


console.log('[services.github] - Created new instance of GitHub user.'); console.log('[services.github] - Created new instance of SydJS user.');
console.log('------------------------------------------------------------'); console.log('------------------------------------------------------------');


return saveSydjsUser(); return saveSydjsUser();


} }


// Function to save GitHub user // Function to save SydJS user
var saveSydjsUser = function() { var saveSydjsUser = function() {


// Save the GitHub user data // Save the SydJS user data
console.log('[services.github] - Saving GitHub user...'); console.log('[services.github] - Saving SydJS user...');
console.log('------------------------------------------------------------'); console.log('------------------------------------------------------------');


var userData = { var userData = {
Expand All @@ -151,21 +151,21 @@ exports.authenticateUser = function(req, res, next, callback)
} }
}; };


console.log('[services.github] - GitHub user update data:', userData ); console.log('[services.github] - SydJS user update data:', userData );


data.sydjsUser.set(userData); data.sydjsUser.set(userData);


data.sydjsUser.save(function(err) { data.sydjsUser.save(function(err) {


if (err) { if (err) {
console.log(err); console.log(err);
console.log("[services.github] - Error saving GitHub user."); console.log("[services.github] - Error saving SydJS user.");
console.log('------------------------------------------------------------'); console.log('------------------------------------------------------------');
return callback(err); return callback(err);


} else { } else {


console.log("[services.github] - Saved GitHub user."); console.log("[services.github] - Saved SydJS user.");
console.log('------------------------------------------------------------'); console.log('------------------------------------------------------------');


if ( req.user ) if ( req.user )
Expand All @@ -179,10 +179,10 @@ exports.authenticateUser = function(req, res, next, callback)


} }


// Function to sign in GitHub user // Function to sign in SydJS user
var signinSydjsUser = function() { var signinSydjsUser = function() {


console.log('[services.github] - Signing in GitHub user...'); console.log('[services.github] - Signing in SydJS user...');
console.log('------------------------------------------------------------'); console.log('------------------------------------------------------------');


var onSuccess = function(user) { var onSuccess = function(user) {
Expand Down

0 comments on commit f2d9aae

Please sign in to comment.