happy tears and thoughts api project by Varia#27
happy tears and thoughts api project by Varia#27VariaSlu wants to merge 18 commits intoTechnigo:masterfrom
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.
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.
great to add documentation in the readme too!
| createdBy: { | ||
| type: mongoose.Schema.Types.ObjectId, | ||
| ref: 'User', | ||
| required: true |
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