Project

General

Profile

Refactor #28584

refactor returned payload from API middleware

Added by Ron Lavi 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
JavaScript stack
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
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.

Associated revisions

Revision 57c6f203 (diff)
Added by Ron Lavi 10 months ago

Fixes #28584 - refactor API middleware payload

split the response and payload which are passed
from the middleware to the reducers.

History

#1 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7301 added

#2 Updated by The Foreman Bot 10 months ago

  • Fixed in Releases 2.0.0 added

#3 Updated by Ron Lavi 10 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF