fix(registry): send download_url field matching handler expectation

SDK was sending { url } but the Go handler binds to { download_url },
causing every registry Install click to return 400.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 12:12:38 +00:00
parent a887b4c78b
commit 761c3fb30a

View File

@@ -256,7 +256,7 @@ export function createDomains(restClient) {
update: (id, file) => rc.upload(`/api/v1/admin/packages/${id}/update`, file), // v0.5.4
exportPkg: (id) => `/api/v1/admin/packages/${id}/export`, // v0.5.4 (URL for window.open)
registry: () => rc.get('/api/v1/admin/packages/registry'),
registryInstall: (url) => rc.post('/api/v1/admin/packages/registry/install', { url }),
registryInstall: (url) => rc.post('/api/v1/admin/packages/registry/install', { download_url: url }),
// v0.5.0: Extension permissions
permissions: (id) => rc.get(`/api/v1/admin/extensions/${id}/permissions`),
grantPerm: (id, perm) => rc.post(`/api/v1/admin/extensions/${id}/permissions/${perm}/grant`, {}),