Cleanup instagram generated code in secrets.js and app.js
This commit is contained in:
		
							
								
								
									
										18
									
								
								generator.js
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								generator.js
									
									
									
									
									
								
							@@ -637,6 +637,14 @@ inquirer.prompt({
 | 
			
		||||
      // LinkedIn Authentication //
 | 
			
		||||
      /////////////////////////////
 | 
			
		||||
 | 
			
		||||
      var linkedinRoutes = M(function() {
 | 
			
		||||
        /***
 | 
			
		||||
        app.get('/auth/linkedin', passport.authenticate('linkedin', { state: 'SOME STATE' }));
 | 
			
		||||
        app.get('/auth/linkedin/callback', passport.authenticate('linkedin', { failureRedirect: '/login' }), function(req, res) {
 | 
			
		||||
          res.redirect(req.session.returnTo || '/');
 | 
			
		||||
        });
 | 
			
		||||
        ***/
 | 
			
		||||
      });
 | 
			
		||||
      var linkedinStrategyRequire = "var LinkedInStrategy = require('passport-linkedin-oauth2').Strategy;";
 | 
			
		||||
      var linkedinStrategy = M(function() {
 | 
			
		||||
        /***
 | 
			
		||||
@@ -1039,6 +1047,16 @@ inquirer.prompt({
 | 
			
		||||
        profileTemplate.splice(index - 1, 5);
 | 
			
		||||
        fs.writeFileSync(profileTemplateFile, profileTemplate.join('\n'));
 | 
			
		||||
 | 
			
		||||
        // Remove Instagram from app.js
 | 
			
		||||
        index = app.indexOf("app.get('/auth/instagram', passport.authenticate('instagram'));");
 | 
			
		||||
        app.splice(index, 4);
 | 
			
		||||
        fs.writeFileSync(appFile, app.join('\n'));
 | 
			
		||||
 | 
			
		||||
        // Remove Instagram from secrets.js
 | 
			
		||||
        index = secrets.indexOf('  instagram: {');
 | 
			
		||||
        secrets.splice(index, 7);
 | 
			
		||||
        fs.writeFileSync(secretsFile, secrets.join('\n'));
 | 
			
		||||
 | 
			
		||||
        // Remove Instagram from User.js
 | 
			
		||||
        index = userModel.indexOf('  instagram: String,');
 | 
			
		||||
        userModel.splice(index, 1);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user