Skip to content

feat: Comments API with Add, Edit and Delete functionality - #3

Open
Ncode-93 wants to merge 1 commit into
mainfrom
Comments-API
Open

feat: Comments API with Add, Edit and Delete functionality#3
Ncode-93 wants to merge 1 commit into
mainfrom
Comments-API

Conversation

@Ncode-93

@Ncode-93 Ncode-93 commented Aug 4, 2025

Copy link
Copy Markdown
Owner

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 comment
  • PATCH /comments/:id — update a comment
  • DELETE /comments/:id — delete a comment

Folder Structure

  • modules/comments/
    • comments_service.py — service layer
    • rest_api/ — router + view
    • internal/ — includes reader, writer, utils, and repository
    • store/comments_model.py — data model
    • types.py — type definitions
    • errors.py — custom exceptions

Testing

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!

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.

1 participant