-
Notifications
You must be signed in to change notification settings - Fork 31
happy tears and thoughts api project by Varia #27
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
base: master
Are you sure you want to change the base?
Conversation
|
Hey, I took a look at your code, and I can see that it accomplishes everything it needs to. It correctly validates all the necessary aspects, which is great. I liked the feature on your frontend where it displays the logged-in user I thought was a nice touch. I don't have many recommendations, but one suggestion I have is to experiemnet with break out some of your routes and authorization into saperate file instead of within your server. It would make them easier to find since they are currently a bit buried in the code. Other than that, I think you’ve done really well. Your code is clear and gets the job done. It might also be beneficial to experiment more with user data to see how you can enhance the frontend with it. Overall, your backend has accomplished everything it should, and it's very easy to read. Great job! |
|
Thanks so much for the review, Jonny! 😊 I appreciate you taking the time to go through my code and share your thoughts. That’s a great tip about moving the routes and auth to separate files. I’ll do it that way next time, gret point. Glad to hear the frontend detail with the logged-in user stood out. Thanks again for the kind feedback! |
JennieDalgren
left a comment
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.
Great job with this project. It is meeting all requirements.
Your code structure is clean and easy to follow with comments where it is necessary.
Well done!
| ## Endpoints | ||
| GET / -> API docs | ||
| GET /thoughts -> list latest 20 | ||
| GET /thoughts/:id -> single thought | ||
| POST /thoughts/:id/like -> like | ||
| POST /signup -> create user | ||
| POST /login -> login (returns accessToken) | ||
| POST /thoughts -> create (JWT required) | ||
| PATCH /thoughts/:id -> update (JWT + author-only) | ||
| DELETE /thoughts/:id -> delete (JWT + author-only) | ||
|
|
||
| ## Deploy |
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.
great to add documentation in the readme too!
| createdBy: { | ||
| type: mongoose.Schema.Types.ObjectId, | ||
| ref: 'User', | ||
| required: 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.
⭐
Please include your Render link here. https://js-project-api-862g.onrender.com/
netlify https://happyhappyhappyhappy.netlify.app/
FE https://github.com/VariaSlu/js-project-happy-thoughts