superposition
superposition copied to clipboard
feat: delete support for default config in UI
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), becauseno-contentis 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-contentor any other scenario that I am not currently aware of.