Skip to content

Refactoring API calls #101

@milan-lakhani

Description

@milan-lakhani

All the API call links should be refactored and stored seperate in the frontend as well as backend. Ideally a good coding practice should be using variables to call the API endpoints, where endpoints are stored cohesively in a seperate file. This makes development easy where I won't have to change every link in the frontend when I am testing with a local hosted backend.

  • Collecting API Links and storing in a seperate file
  • Refactoring links into root + endpoint format for example root = 'http://localhost:3000' and endpoints can beaddLeagueForm='/forms/league'
  • A seperate functions for calling All the APIs. we don't need to clutter our files with axios calls. As app will grow, it will become extremely difficult to find calls.

Any further suggestions are also welcome!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions