Skip to content

Conversation

@Avijit-roy
Copy link

refactor: consolidate API service layer with generic handler

  • Fix template literal syntax errors in all API endpoints
  • Create reusable handleApiCall() function to eliminate code duplication
  • Initialize axios instance with baseURL, timeout, and default headers
  • Standardize error handling and response formatting across all endpoints
  • Organize endpoints by feature (auth, users, files, posts)
  • Improve error logging with method and endpoint details

Reduces code by ~70% while improving maintainability and consistency.

refactor: consolidate API service layer with generic handler

- Fix template literal syntax errors in all API endpoints
- Create reusable handleApiCall() function to eliminate code duplication
- Initialize axios instance with baseURL, timeout, and default headers
- Standardize error handling and response formatting across all endpoints
- Organize endpoints by feature (auth, users, files, posts)
- Improve error logging with method and endpoint details

Reduces code by ~70% while improving maintainability and consistency.
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.

1 participant