mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 09:05:17 -07:00
fix(api-client): declare moved + errors on migrateModels response type
ModelManagement.tsx reads migrationResult.moved (added in #433) but apiClient.migrateModels() was typed as returning only { source, destination }. The backend actually returns { moved: int, errors: list[str], source, destination } (backend/routes/models.py:140, 168). Widen the TS return type so the check typechecks under the new CI gate from #418. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
882cabc7d2
commit
d5763a8abf
@@ -390,7 +390,9 @@ class ApiClient {
|
|||||||
return this.request<{ path: string }>('/models/cache-dir');
|
return this.request<{ path: string }>('/models/cache-dir');
|
||||||
}
|
}
|
||||||
|
|
||||||
async migrateModels(destination: string): Promise<{ source: string; destination: string }> {
|
async migrateModels(
|
||||||
|
destination: string,
|
||||||
|
): Promise<{ source: string; destination: string; moved: number; errors: string[] }> {
|
||||||
return this.request('/models/migrate', {
|
return this.request('/models/migrate', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({ destination }),
|
body: JSON.stringify({ destination }),
|
||||||
|
|||||||
Reference in New Issue
Block a user