superposition icon indicating copy to clipboard operation
superposition copied to clipboard

feat: delete support for default config in UI

Open ShubhranshuSanjeev opened this issue 1 year ago • 0 comments

Problem

No delete support for default config from UI

Solution

Add delete button for each row in default config table, which calls DELETE /default-config/{key} endpoint.

Additional changes

Refactored request function in frontend/utils.rs to return raw response instead of parsing it to a type. Reason:

  • Responses can be empty, not necessarily have a content.
  • Parsing no-content to a type will always fail even if we are parsing it to () (unit), because no-content is not a valid JSON.
  • Separating parsing of the response from the actual request part, will be bit cleaner, as request function will get bloated with conditionals to handle the no-content or any other scenario that I am not currently aware of.

ShubhranshuSanjeev avatar May 15 '24 13:05 ShubhranshuSanjeev