Skip to content

Commit

Permalink
fix comments #1
Browse files Browse the repository at this point in the history
  • Loading branch information
robota-x committed Apr 28, 2016
1 parent efd7639 commit 2a4d60d
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 12 deletions.
4 changes: 0 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
// app.use(express.static(path.join(__dirname, 'public')));
app.use(express.static('client'));

app.use('/', index);
Expand Down Expand Up @@ -66,8 +65,6 @@ passport.use(new GithubStrategy({
callbackURL: "http://localhost:3000/users/auth/callback"
},
function(accessToken, refreshToken, profile, done) {
console.log("verifyF with", profile.username);
//associate with uID in db (first or create)
return done(null, profile);
}
));
Expand All @@ -78,7 +75,6 @@ passport.serializeUser(function(user, done) {
});

passport.deserializeUser(function(user, done) {
// console.log("deserializeUser with", user);
done(null, user);
});

Expand Down
1 change: 0 additions & 1 deletion client/js/services/eventService.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ apptivistApp.service('EventService', ['$http', 'EventFactory', function($http, E
};

this.deleteEvent = function(id) {
console.log(id);
return $http.delete('/api/events/'+ id, { 'Content-Type': 'application/json;charset=UTF-8' });
};

Expand Down
5 changes: 2 additions & 3 deletions server/routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ router.get('/events/:event_id', function(req, res) {
id: req.params.event_id
}
}).then(function(Event){
res.json(Event)
res.json(Event);
});
});

router.put('/events/:event_id', function(req, res) {
console.log("called", req.params, req.body, req.query);
models.Event
.find({where: {
id: req.params.event_id
Expand All @@ -56,7 +55,7 @@ router.delete('/events/:event_id', function(req, res) {
}
}).then(function(Event) {
res.json(Event);
})
});

});

Expand Down
1 change: 0 additions & 1 deletion server/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var router = express.Router();
var app = express();

router.get('/', function (req, res) {
console.log('loading index, passing i:',req.user);
res.render('index');
});

Expand Down
1 change: 0 additions & 1 deletion server/routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ router.get('/auth', passport.authenticate('github'));

router.get('/auth/callback', passport.authenticate('github', { failureRedirect: '/' }),
function(req, res) {
console.log("success for", req.user.username);
models.User
.find({
where: {githubID: req.user.id}
Expand Down
3 changes: 1 addition & 2 deletions test/event.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ describe('events', function(){
chai.request(server)
.get('/api/events')
.end(function(err, res){
console.log(res.body)
expect(res).to.have.status(200);
expect(res).to.be.json;
expect(res).tobe.json;
expect(res.body).to.be.a('array');
done();
});
Expand Down

0 comments on commit 2a4d60d

Please sign in to comment.