mirror of
https://github.com/decolua/9router.git
synced 2026-05-08 12:01:28 +00:00
fix: send providerSpecificData in Edit modal validate calls
The Check button in the Edit modal was sending only apiKey without the Azure endpoint/deployment/org, causing validation to fail. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -76,7 +76,11 @@ export default function EditConnectionModal({ isOpen, connection, proxyPools, on
|
|||||||
const res = await fetch("/api/providers/validate", {
|
const res = await fetch("/api/providers/validate", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ provider: connection.provider, apiKey: formData.apiKey }),
|
body: JSON.stringify({
|
||||||
|
provider: connection.provider,
|
||||||
|
apiKey: formData.apiKey,
|
||||||
|
...(isAzure ? { providerSpecificData: azureData } : {}),
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
setValidationResult(data.valid ? "success" : "failed");
|
setValidationResult(data.valid ? "success" : "failed");
|
||||||
@@ -105,7 +109,11 @@ export default function EditConnectionModal({ isOpen, connection, proxyPools, on
|
|||||||
const res = await fetch("/api/providers/validate", {
|
const res = await fetch("/api/providers/validate", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ provider: connection.provider, apiKey: formData.apiKey }),
|
body: JSON.stringify({
|
||||||
|
provider: connection.provider,
|
||||||
|
apiKey: formData.apiKey,
|
||||||
|
...(isAzure ? { providerSpecificData: azureData } : {}),
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
isValid = !!data.valid;
|
isValid = !!data.valid;
|
||||||
|
|||||||
Reference in New Issue
Block a user