Sidharth-Singh10 / Affinity-backend

14 stars 14 forks source link

Refactor: Organize Routes into Modules and Create Route Functions #1

Closed Sidharth-Singh10 closed 1 month ago

Sidharth-Singh10 commented 1 month ago

Description:

As the number of routes in main.rs grows, it's essential to keep the file organized. We can split the routes into distinct modules and create functions that return Router instances for each group of routes. This approach maintains clarity and modularity without needing to handle routes as vectors.

Tasks:

1. Create Route Modules

2. Define Grouped Routers in Each Module

3. Merge Routes in main.rs

Benefits:

References: Axum Documentation

JonasBakys0 commented 1 month ago

Hi @Sidharth-Singh10, I would like to try to solve this issue if you don't mind.

Sidharth-Singh10 commented 1 month ago

@JonasBakys0 Sure, go ahead!!