Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jordan Manu Instagram Challenge #918

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

JordanManu
Copy link

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





Copy link

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;
}
}
Copy link

Choose a reason for hiding this comment

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

amazing CSS!

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

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

- 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

Choose a reason for hiding this comment

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

clear instructions on setup

const PostsController = {
Index: (req, res) => {
Post.find({})
.sort({ _id: -1 })
Copy link

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

console.log("Update likes in controller");
console.log(req.params.id);
const action = req.body.action;
const counter = (action === "Like" ? 1 : -1);
Copy link

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

@@ -0,0 +1,38 @@
const User = require("../models/user");
const bcrypt = require("bcrypt");
Copy link

Choose a reason for hiding this comment

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

Password encryption

};


module.exports = mongoose.model("User", UserSchema);
Copy link

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

Copy link

@mcsuGH mcsuGH left a comment

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.

None yet

2 participants