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

Milestone 11: API Endpoints for user - post - comment #11

Merged
merged 12 commits into from
Dec 16, 2023

Conversation

ITurres
Copy link
Owner

@ITurres ITurres commented Dec 15, 2023

Pull Request Summary for Milestone 11 Completion


Added:

/app/controllers/api/v1/application_controller.rb

  • @ITurres: I have added this file to define the base class for all the controllers in the API.
  • also included the MimeResponds module to facilitate the MIME type-based responses.

/app/controllers/api/v1/comments_controller.rb

  • @ITurres: I have added this file to define the comments controller for the API, for fetching comments for a specific post, and creating, updating, and deleting comments. It enforces constraints, such as permitted parameters and specific callbacks for actions like setting up comments.

/app/controllers/api/v1/posts_controller.rb

  • @demesameneshoa: i have added the post controllers to reading, creating and deleting methods to be accessed by the API

/app/controllers/api/v1/users_controller.rb

  • @demesameneshoa: i have added the users controllers to reading, creating and deleting methods to be accessed by the API

Modified:

/Gemfile and /Gemfile.lock

  • @ITurres: I have added the active_model_serializers and responders gems to the Gemfile and ran bundle install to update the Gemfile.lock.

/README.md

  • @ITurres: check complete the 'API endpoints' task.

/app/models/comment.rb

  • @ITurres: I have added a new method as_json to return the user_id, text, and comment id.

/app/models/post.rb

  • @demesameneshoa: I have added the method as_json to return the id, title and the text.

/app/models/user.rb

  • @demesameneshoa: I have added the method ad_json to retun id, name and bio.

/config/environments/development.rb

  • @ITurres: I have added the config.debug_exception_response_format to :api to show the error messages in the browser.

/config/routes.rb

  • @ITurres: I have added the routes for the API endpoints.

Thank you for reviewing this PR. Feel free to reach out on Slack as Arturo (Arthur) Emanuel Guerra Iturres and/or Demes Ameneshoa for any queries or further assistance. 🌟

@ITurres ITurres added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 15, 2023
@ITurres ITurres marked this pull request as ready for review December 15, 2023 23:01
Copy link

@Reem-lab Reem-lab left a comment

Choose a reason for hiding this comment

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

Hi @ITurres and @demesameneshoa, 👋🏻👋🏻

Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉

Highlights

  • Followed Gitflow 💯
  • Descriptive PR⭐
  • No Linters error ✅
  • Kudos for working on the API endpoints🤩
  • Your design is amazing ⭐

Optional suggestions

Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.

Cheers, and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@ITurres
Copy link
Owner Author

ITurres commented Dec 16, 2023

@Reem-lab Hi Reem!, Thank you so much for taking the time to review our PR 🥳. We wish you a great weekend and happy programming! 👩🏼‍💻

@ITurres ITurres merged commit 5903977 into development Dec 16, 2023
3 checks passed
@Reem-lab
Copy link

@ITurres thank you so much, you are welcome anytime 🚀🔥, happy weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants