Skip to content

Adapt RequestBody handling across components preparing API calls #344

@itsciccio

Description

@itsciccio

Technical Story

As any installer component, I want to prepare a request body that eventually gets sent to the API.

Description

Currently, the functions that prepare the request body to be sent to the API return either a Config object or simply an object. We need to create the custom request body types for each scenario, and adapt the config.service.ts file's save function to accept these request body object types.

This can be done by creating an interface, such as ConfigReqInterface as well as adapting the ServiceInterface to take a ReqBodyInterface. See the below images provided by @zimaah for an example on this:

image
image
image

Requirements

  • Create custom request body types across all components that prepare request bodies to make use of API calls.
  • Create the correct interface/(s)
  • Apply the changes and manually test to check all works as intended

Blocked by

N/A

Acceptance criteria

Scenario: User about make use of functionality that requires an API call
Given: For example, form submission (repositories, alerts, subchain, sources)
When: Form data correctly inputted
Then: Data is submitted successfully and updated in Mongo

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions