juninhokaponne / friendRecomendation

This project aims to use a simple recommendation algorithm, initially it was made for a challenge and today it counts as a free repository for everyone to contribute.
3 stars 5 forks source link

Refractor the Router #1

Closed manzil-infinity180 closed 1 year ago

manzil-infinity180 commented 1 year ago

Example - Move this to controller file with specific file and then exports from the controller (req, res) => { const { cpf, name } = req.body; const result = personController.createPerson(cpf, name); res.status(result.error ? 400 : 200).send(result); }

juninhokaponne commented 1 year ago

Hey Manzil, Nice one, It's a good way to do that, I refactored the Person routes.

If you feel comfortable contributing to this project, I can assign for you a new issue to refactor the relationshipController.js!

About the point of this issue, below is the simple modification in routes.js file and some modifications in PersonController.js.

You can see PR link Here 🚀

Before

carbon (1)

Current

carbon

Thank you for collaborating, feel free to contribute to the project with ideas, bugs or Pull requests.

manzil-infinity180 commented 1 year ago

Hey Manzil, Nice one, It's a good way to do that, I refactored the Person routes.

If you feel comfortable contributing to this project, I can assign for you a new issue to refactor the relationshipController.js!

About the point of this issue, below is the simple modification in routes.js file and some modifications in PersonController.js.

You can see PR link Here 🚀

Before

carbon (1)

Current

carbon

Thank you for collaborating, feel free to contribute to the project with ideas, bugs or Pull requests.

Sure , i am ready with my PR (assign to me)

manzil-infinity180 commented 1 year ago

3

juninhokaponne commented 1 year ago

Your changes have been merged and can now be seen in the main branch 🥇.

Thank you for your contribution, feel free to continue working to improve the project.