mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-15 04:40:40 -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');
|
||||
}
|
||||
|
||||
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', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ destination }),
|
||||
|
||||
Reference in New Issue
Block a user