Project

General

Profile

Actions

Refactor #28584

closed

refactor returned payload from API middleware

Added by Ron Lavi almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
JavaScript stack
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

currently the returned payload is a mix of data and payload, looks like: `payload: { ...payload, ...data }`
which is quite risky and not the best approach to handle API responses,
in this refactor I will split it into results and params, as params are the values which was passed to the API request,
it will look something like this: `payload: { results: data, params: payload }` in the API middleware.

Actions

Also available in: Atom PDF