hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
153 stars 136 forks source link

bugfix: update endpoint response based on frontend request #875

Closed MikeSoft007 closed 2 months ago

MikeSoft007 commented 2 months ago

Description

This pull request modifies the response structure of the specified endpoint to dynamically adjust based on the request from the frontend. The change ensures that the data returned is tailored to the specific needs of the frontend, improving efficiency and user experience.

Related Issue (Link to issue ticket)

Motivation and Context

This change is required to ensure that the backend can provide responses that are more aligned with the requirements of the frontend. It addresses the issue of unnecessary data being sent to the frontend, which can lead to performance inefficiencies and a suboptimal user experience.

How Has This Been Tested?

The change was tested using unit tests and integration tests in a development environment. The tests included sending various requests from the frontend and verifying that the responses were correctly tailored based on the request parameters.

Screenshots (if appropriate - Postman, etc):

image

Types of changes

Checklist: