-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
base: main
Are you sure you want to change the base?
Conversation
JordanManu
commented
May 15, 2022
- Features
- Users can post pictures
- Users can write comments on pictures
- Users can like a picture
- Styled awesomely
|
||
|
||
|
||
|
There was a problem hiding this comment.
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; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazing CSS!
beforeAll(function (done) { | ||
mongoose.connect("mongodb://0.0.0.0/acebook_test", { | ||
useNewUrlParser: true, | ||
useUnifiedTopology: true, | ||
}); |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 }) |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this 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).