anuraghazra / anuraghazra/BugVilla

Refactor: remove bug.body field and just append comment on bug creation.

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
TypeScript
Stars
232
Forks
73
PR merge metrics
No merged PRs in 30d

Description

In the Bug Model Instead of using bug.body for description of the bug, we can just add a comment while creating the bug that way we don't have to worry about managing two different reactions schemas.

https://github.com/anuraghazra/BugVilla/blob/2f1e6039e5c819d869fba0994b18f5d4ba0b24b1/server/models/bugModel.js#L30-L34

duplicate code introduced by current approach can be fixed:

https://github.com/anuraghazra/BugVilla/blob/2f1e6039e5c819d869fba0994b18f5d4ba0b24b1/server/controllers/BugsController.js#L334

https://github.com/anuraghazra/BugVilla/blob/2f1e6039e5c819d869fba0994b18f5d4ba0b24b1/server/controllers/CommentsController.js#L145

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.