Change copilot settings call to use new backend endpoint. (#1781)

* Change copilot settings call to use new backend endpoint.

* Refactor EndpointUtils function for new backend enablement.
This commit is contained in:
jawelton74
2024-04-04 10:18:50 -07:00
committed by GitHub
parent db50f42832
commit 7f6338b68b
5 changed files with 30 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import { useBoolean } from "@fluentui/react-hooks";
import { userContext } from "UserContext";
import { usePortalBackendEndpoint } from "Utils/EndpointUtils";
import { useNewPortalBackendEndpoint } from "Utils/EndpointUtils";
import * as React from "react";
import ConnectImage from "../../../../images/HdeConnectCosmosDB.svg";
import ErrorImage from "../../../../images/error.svg";
@@ -19,7 +19,7 @@ interface Props {
}
export const fetchEncryptedToken = async (connectionString: string): Promise<string> => {
if (!usePortalBackendEndpoint(BackendApi.GenerateToken)) {
if (!useNewPortalBackendEndpoint(BackendApi.GenerateToken)) {
return await fetchEncryptedToken_ToBeDeprecated(connectionString);
}