feat: Comments API with Add, Edit and Delete functionality - #3
Open
Ncode-93 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Comments API (Add, Edit and delete functionality)
What and Why
This PR introduces the Comments API with support for creating, updating, and deleting comments.
I followed the existing documentation structure and directory organization guidelines while creating this module.
Loom link - https://www.loom.com/share/c4ac9963b3cb48bbb91a53861f25841e?sid=878aa5c7-248b-409a-8f23-9326cc923b04
API Endpoints Added
POST /comments— create a commentPATCH /comments/:id— update a commentDELETE /comments/:id— delete a commentFolder Structure
modules/comments/comments_service.py— service layerrest_api/— router + viewinternal/— includes reader, writer, utils, and repositorystore/comments_model.py— data modeltypes.py— type definitionserrors.py— custom exceptionsTesting
The API couldn't be tested fully via Postman due to an authentication issue related to JWT-based protection. CSRF is not used here.
If I had more time, I would continue debugging and testing it thoroughly.
Thanks for the opportunity!