diff --git a/lessons/08-tests-tasks/twetter/app.js b/lessons/08-tests-tasks/twetter/app.js index f0dd9070..cc7bd87b 100644 --- a/lessons/08-tests-tasks/twetter/app.js +++ b/lessons/08-tests-tasks/twetter/app.js @@ -1,3 +1,4 @@ +//Comment and section the parts in this file and look into using express router for api routes. Also, maybe utilize a separate authentication file for all things authentication related. var express = require('express'); var path = require('path'); var logger = require('morgan'); @@ -64,7 +65,7 @@ passport.use(new FacebookStrategy({ } )); -passport.use(new LocalStrategy( +passport.use(new LocalStrategy( //good job on getting this working!! function(username, password, done) { User.findOne({ username: username }, function (err, user) { if (err) { return done(err); } diff --git a/lessons/08-tests-tasks/twetter/feedback.txt b/lessons/08-tests-tasks/twetter/feedback.txt new file mode 100644 index 00000000..398a3f3e --- /dev/null +++ b/lessons/08-tests-tasks/twetter/feedback.txt @@ -0,0 +1,12 @@ +Homework Feedback: + +Functionality: +- Completion: You have all of the functionalities (including tests and OAuth!); however, you don't have delete tweet working. Also, awesome tests. I appreciate that you sectioned them out and that they are detailed. There are two that don't pass for me: 'should return 200 OK on authenticated GET /' and 'should get user session for current user'. Both seem to be user specific, which might make sense because you're not setting a user session anywhere. (16/20) +- Bug Free: The app does seem bug free. Again, you don't have deleting tweets working. It's a good idea to remove your log statements when you are in production. (10/10) + +Quality: +- Good Coding Practices: You use good styling practices, specifically the way you group your different jquery calls and reuse functions. The tests are written out nicely and follow the right syntax. (10/10) +- Readability: Functions and variables are named well, good comments and lines are not too long and sectioned well. (10/10) + + +Good work!!!!!! diff --git a/lessons/08-tests-tasks/twetter/public/javascripts/main.js b/lessons/08-tests-tasks/twetter/public/javascripts/main.js index 9a3703d7..d02e64bf 100644 --- a/lessons/08-tests-tasks/twetter/public/javascripts/main.js +++ b/lessons/08-tests-tasks/twetter/public/javascripts/main.js @@ -1,3 +1,4 @@ +//You're missing a delete functionality for each of your tweets. Also, remove console logs that are specifc to just debugging. Good naming of the different functions and variables. var $postForm = $("#twet-post-form"); var $loginForm = $("#login-form"); var $templateLi = $('#template-li'); diff --git a/lessons/08-tests-tasks/twetter/routes/index.js b/lessons/08-tests-tasks/twetter/routes/index.js index 61c53438..8a222470 100644 --- a/lessons/08-tests-tasks/twetter/routes/index.js +++ b/lessons/08-tests-tasks/twetter/routes/index.js @@ -1,3 +1,4 @@ +//I like that you comment on each post that you have, but it would be nice if you split this file into multiple files grouping them (user-specific, login-specific, tweets-specifc). I would also use express router to clean up and make api specific routes, but since we're doing some rendering from the backend, it's not as easy to do. Your local stategy is working though!!!! var path = require('path'); var express = require('express'); var Twet = require('../models/twetModel.js'); @@ -46,6 +47,7 @@ routes.dashGET = function(req, res) { if (req.user) { User.findOne({username: req.user.username}, function (err, user) { if (user) { + //Remove console logs that were just for your debugging, and comment the specifics of how you're using mongoose queries. console.log(user); res.locals.currentUser = user; Twet.find().sort({_id: -1}).exec(function(err,twets) {