Skip to content

Refactor API Requests #1214

@georginikolov7

Description

@georginikolov7

Once BE switches to accepting multipart/form-data instead of application/json for PUT and PATCH requests, we need to refactor the FE so it sends the appropriate form data.

Task

  1. Refactor apiClient; make it as generic as possible
  2. Refactor all admin panel pages that have image_url field to have a file_upload field. Said field needs to be validated for file_type: ONLY .jpg, .png, .webp are accepted, file size is maximum: (WiP) MB
  3. Using the new apiClient.ts send the appropriate requests

Pages to refactor:

  • Sponsors
  • Judges
  • Past Events
  • Mentors
  • Meet-the-team
    (AKA all of them without Feature Switches)

Requirements:

  1. PUT and PATCH on endpoints that accept image are multipart/form-data and not just json.
  2. File Fields are validated as per above description

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions