Namanl2001 / MERN-Gurujii-dev

⭐️ Helps! in finding Tutors.
https://guru-jii.herokuapp.com/
MIT License
33 stars 85 forks source link

controller module created for handling endpoints (#82) #85

Closed singhayushh closed 3 years ago

singhayushh commented 3 years ago

Related Issue

Using industry standards for backend project structuring - using separate controllers directory to manage endpoint requests. Closes: #82

Describe the changes you've made

The existing structure of the code was the handler functions for each routes were coded right inside the router definition. I have now moved all handler functions to a separate directory named 'controllers'. Now each of the route just has a function call to the respective handler. This is an industry standard convention that helps in better code maintenance, readability as well as debugging.

Type of change

What sort of change have you made:

Mention any unusual behaviour of your code (Write NA if not)

NA

Checklist:

singhayushh commented 3 years ago

Hey can this PR be merged anytime soon? I am about to start with another issue

Namanl2001 commented 3 years ago

Should this be closed ?

singhayushh commented 3 years ago

Should this be closed ?

This should have been automatically merged. Idk what happened I see the code updated in the main repository .