Skip to content

Conversation

@VariaSlu
Copy link

@KidFromCalifornia
Copy link

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!

@VariaSlu
Copy link
Author

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!

Copy link

@JennieDalgren JennieDalgren left a 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!

Comment on lines +13 to +24
## 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

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!

Comment on lines +18 to +21
createdBy: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
required: true

Choose a reason for hiding this comment

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

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.

3 participants