azure.ts 262 B

123456789
  1. export function makeAzurePath(path: string, apiVersion: string) {
  2. // should omit /v1 prefix
  3. path = path.replaceAll("v1/", "");
  4. // should add api-key to query string
  5. path += `${path.includes("?") ? "&" : "?"}api-version=${apiVersion}`;
  6. return path;
  7. }