feat: add bee-desktop settings capabilities (#323)
* refactor: make the config readonly and extract endpoint calls to hook (+2 squashed commits) Squashed commits: [91ffe45] feat: add swap-endpoint [e1d0c3a] feat: add bee-desktop settings capabilities * feat: use the request mechanism that uses the bee-desktop API key * fix: properly reset the error or on error set the config to null
This commit is contained in:
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
import axios from 'axios'
|
||||
|
||||
export function getJson(url: string): Promise<Record<string, any>> {
|
||||
return sendRequest(url, 'GET')
|
||||
export function getJson<T extends Record<string, any>>(url: string): Promise<T> {
|
||||
return sendRequest(url, 'GET') as Promise<T>
|
||||
}
|
||||
|
||||
export function postJson(url: string, data?: Record<string, any>): Promise<Record<string, unknown>> {
|
||||
|
||||
Reference in New Issue
Block a user