For connection-string based authentication, the request would be made… (#1644)

* For connection-string based authentication, the request would be made with low priority request header and for AAD based authentication, users can select the priority-request option from the settings panel

* removed unused imports

* prettier checks

---------

Co-authored-by: Faiz Chachiya <faizchachiya@microsoft.com>
This commit is contained in:
FAIZ CHACHIYA
2023-10-05 02:48:54 +05:30
committed by GitHub
parent 07d242f972
commit ca861a0d77
5 changed files with 28 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
import useSWR from "swr";
import { configContext } from "../ConfigContext";
import { DatabaseAccount } from "../Contracts/DataModels";
import { userContext } from "../UserContext";
interface AccountListResult {
nextLink: string;
@@ -15,7 +14,7 @@ export async function fetchDatabaseAccounts(subscriptionId: string, accessToken:
headers.append("Authorization", bearer);
let accounts: Array<DatabaseAccount> = [];
const apiVersion = userContext.features.enableThroughputCap ? "2021-10-15-preview" : "2021-06-15";
const apiVersion = "2023-09-15-preview";
let nextLink = `${configContext.ARM_ENDPOINT}/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts?api-version=${apiVersion}`;
while (nextLink) {