benoit-bremaud / HappiHub

HappiHub - A platform for organizing and discovering cultural and artistic events. Join the community and explore events happening around you!
https://www.happihub.com
MIT License
1 stars 3 forks source link

`refactor/201-middleware-implementation` #201

Open benoit-bremaud opened 4 months ago

benoit-bremaud commented 4 months ago

Summary

The commentController.js file contains repetitive code for handling errors and checking for comment existence. To improve the maintainability and readability of the code, we should refactor it by implementing middlewares for common tasks.

Context

The current implementation of commentController.js has repetitive code for error handling and checking if a comment exists. This not only increases the size of the file but also makes it harder to maintain and update. By introducing middlewares, we can centralize these common tasks and reduce code duplication.

Objectives

Acceptance Criteria

Tasks

Resources

UML Diagrams References

Branch Name

refactor/201-middleware-implementation

Labels

Milestone Suggestion

Code Refactoring

Complementary Suggested Tasks