Description of Problem
Our backend/frontend interaction is based around a design pattern where our payload is wrapped in an envelope object. The payload data is attached to an error code and error message.
The backend needs to wrap all data in these envelopes, and the frontend needs to unwrap them. This paradigm isn't necessary as we are able to make a request while expecting one DTO and capture HTTP errors on failure.
Proposed Solution
Refactor the src/services directory to get the DTOs directly from the backend rather than getting the wrapped objects.
Related Issue
Backend issue slaclab/react-squirrel-backend#32
Description of Problem
Our backend/frontend interaction is based around a design pattern where our payload is wrapped in an envelope object. The payload data is attached to an error code and error message.
The backend needs to wrap all data in these envelopes, and the frontend needs to unwrap them. This paradigm isn't necessary as we are able to make a request while expecting one DTO and capture HTTP errors on failure.
Proposed Solution
Refactor the
src/servicesdirectory to get the DTOs directly from the backend rather than getting the wrapped objects.Related Issue
Backend issue slaclab/react-squirrel-backend#32