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 #1

Updated by The Foreman Bot almost 5 years ago

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

Updated by The Foreman Bot almost 5 years ago

  • Fixed in Releases 2.0.0 added
Actions #3

Updated by Ron Lavi almost 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF