Sahilll94/Travel-Book

Refactor API Calls into a Centralized `src/services` Directory

オープン

#90 opened on 2026/01/23

 (4 件のコメント) (0 件のリアクション) (1 人の担当者)JavaScript (46 件のフォーク)auto 404
ECWoC26documentationgood first issue

Repository metrics

Stars
 (9 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Documentation Type

Other

Current Issue

Currently, API fetch logic appears to be directly embedded within various components, leading to potential duplication and tightly coupled code.

Proposed Improvement

To improve maintainability, reusability, and separation of concerns, all API related calls should be extracted from components into a dedicated src/services directory. This pattern centralizes API logic, making it easier to manage, mock for testing, and update backend endpoints or authentication headers.

Affected Sections

authService.js, travelService.js, otpverification, travel card and app...

Target Audience

New contributors

Additional Context

@Sahilll94 I would like to be assigned to this Issue, I have read Codeof Conduct and I m under ECWoC 26.

Implementation

  • I can write the documentation changes myself
  • I can provide review and feedback
  • I prefer to let others handle the implementation

Confirmation

  • I have checked that this improvement isn't already covered elsewhere
  • I have searched for existing documentation issues before creating this one

コントリビューターガイド