diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-01-01 23:44:50 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-01-01 23:47:21 +0900 |
| commit | 2fb6471a685bec1433be3335f377a1a2313e4820 (patch) | |
| tree | 328ddaeec0c591b06bf005d48b0242345c1336be /src/client/api/client.ts | |
| parent | f30566e1c7126db4c6242ab38d07a9478f79d3db (diff) | |
| download | kioku-2fb6471a685bec1433be3335f377a1a2313e4820.tar.gz kioku-2fb6471a685bec1433be3335f377a1a2313e4820.tar.zst kioku-2fb6471a685bec1433be3335f377a1a2313e4820.zip | |
refactor(client): migrate API calls to typed RPC client
Replace raw fetch() calls with apiClient.rpc typed client across all
modal and page components. This provides better type safety and
eliminates manual auth header handling.
- Make handleResponse public for component usage
- Update all component tests to mock RPC methods instead of fetch
- Change POSTGRES_HOST default to kioku-db for Docker compatibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/client/api/client.ts')
| -rw-r--r-- | src/client/api/client.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/api/client.ts b/src/client/api/client.ts index c91160d..fc718a2 100644 --- a/src/client/api/client.ts +++ b/src/client/api/client.ts @@ -117,7 +117,7 @@ export class ApiClient { return response; } - private async handleResponse<T>(response: Response): Promise<T> { + async handleResponse<T>(response: Response): Promise<T> { if (!response.ok) { const errorBody = (await response.json().catch(() => ({}))) as ApiError; throw new ApiClientError( |
