Skip to content

refactor: separate routes and controllers#39

Open
IkramBagban wants to merge 2 commits intocode100x:mainfrom
IkramBagban:refactor/seperate-routes-controller
Open

refactor: separate routes and controllers#39
IkramBagban wants to merge 2 commits intocode100x:mainfrom
IkramBagban:refactor/seperate-routes-controller

Conversation

@IkramBagban
Copy link
Contributor

Desc:
This PR refactor the payment and webhook handler logic into seperate contrrollers instead of handling everything inside the routes.

  • Moved payment logic from payment.routes.ts to a separate controller.
  • Moved webhook logic from webhook.routes.ts to a separate controller.
  • Updated routes to use the new controllers.
  • Fixed some basic TypeScript errors in the code.

Why?

  • Improves code maintainability and readability.
  • Follows MVC architecture by keeping routes clean and handling business logic separately.
  • Makes it easier to add new features or modify existing ones in the future.

@yashmakhija
Copy link
Contributor

This branch has conflicts that need to be resolved. Please pull the latest code and fix the conflicts.

@IkramBagban
Copy link
Contributor Author

done

This branch has conflicts that need to be resolved. Please pull the latest code and fix the conflicts.

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.

2 participants