Skip to content

Jordan Manu Instagram Challenge - #918

Open
JordanManu wants to merge 8 commits into
makersacademy:mainfrom
JordanManu:main
Open

Jordan Manu Instagram Challenge#918
JordanManu wants to merge 8 commits into
makersacademy:mainfrom
JordanManu:main

Conversation

@JordanManu

Copy link
Copy Markdown
  • Features
    • Users can post pictures
    • Users can write comments on pictures
    • Users can like a picture
    • Styled awesomely





Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing CSS!

.post-image{
height: 300px;
}
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing CSS!

Comment thread spec/mongodb_helper.js
Comment on lines +3 to +7
beforeAll(function (done) {
mongoose.connect("mongodb://0.0.0.0/acebook_test", {
useNewUrlParser: true,
useUnifiedTopology: true,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connecting to the wrong test database

Comment thread README.md
- You will need to create an account to be able to use the program and make posts
- Once signed up, you'll be directed to the sign in page
- After you're signed in you will be able to post photos with a caption.
- Just click on the post icon in the top right corner, there you can enter a url of your image and add a caption.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clear instructions on setup

Comment thread controllers/posts.js
const PostsController = {
Index: (req, res) => {
Post.find({})
.sort({ _id: -1 })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, reversing posts so that newest gets shown first

Comment thread controllers/posts.js
console.log("Update likes in controller");
console.log(req.params.id);
const action = req.body.action;
const counter = (action === "Like" ? 1 : -1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Like / Unlike feature, but currently can use refresh to keep adding likes, if had more time you could consider to record likes in the database so that likes are unique

Comment thread controllers/sessions.js
@@ -0,0 +1,38 @@
const User = require("../models/user");
const bcrypt = require("bcrypt");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Password encryption

Comment thread models/user.js
};


module.exports = mongoose.model("User", UserSchema); No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, testing the encryption works

@mcsuGH mcsuGH left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing CSS, looks great. Tests are all passing but missing a test to test the like functionality. Password encryption is implemented. Users can log in but may need a log out button for logging out. Good instructions on README + nice video showcasing the webpage.

Can look into adding more functionality once possible, and can make further improvements to already-existing functionality (such as making likes unique).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants