feat(web): add /settings page with ListenBrainz section
Adds api.put helper, ListenBrainz API module with query/mutation helpers, a /settings route with token + enable/disable UI, and 5 tests. Adds Settings to the Shell nav. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,8 @@ export const api = {
|
||||
get: <T>(path: string): Promise<T> => apiFetch(path) as Promise<T>,
|
||||
post: <T>(path: string, body: unknown): Promise<T> =>
|
||||
apiFetch(path, { method: 'POST', body: JSON.stringify(body) }) as Promise<T>,
|
||||
put: <T>(path: string, body: unknown): Promise<T> =>
|
||||
apiFetch(path, { method: 'PUT', body: JSON.stringify(body) }) as Promise<T>,
|
||||
del: (path: string): Promise<null> =>
|
||||
apiFetch(path, { method: 'DELETE' }) as Promise<null>
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user