Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt RequestBody handling across components preparing API calls #344

Open
3 tasks
itsciccio opened this issue Aug 18, 2022 · 0 comments
Open
3 tasks

Adapt RequestBody handling across components preparing API calls #344

itsciccio opened this issue Aug 18, 2022 · 0 comments

Comments

@itsciccio
Copy link
Contributor

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

@itsciccio itsciccio added this to the UI Improvements milestone Aug 18, 2022
@itsciccio itsciccio changed the title Adapt RequestBody handling across components making API calls Adapt RequestBody handling across components preparing API calls Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant