Fix Cassandra Endpoint URLs by adding trailing slash in construction (#235)

This commit is contained in:
Zachary Foster 2020-09-28 15:53:27 -04:00 committed by Steve Faulkner
parent 70c7d84bdb
commit ce485d2354
1 changed files with 4 additions and 4 deletions

View File

@ -307,7 +307,7 @@ export class CassandraAPIDataClient extends TableDataClient {
authType === AuthType.EncryptedToken authType === AuthType.EncryptedToken
? Constants.CassandraBackend.guestQueryApi ? Constants.CassandraBackend.guestQueryApi
: Constants.CassandraBackend.queryApi; : Constants.CassandraBackend.queryApi;
$.ajax(`${collection.container.extensionEndpoint()}${apiEndpoint}`, { $.ajax(`${collection.container.extensionEndpoint()}/${apiEndpoint}`, {
type: "POST", type: "POST",
data: { data: {
accountName: collection && collection.container.databaseAccount && collection.container.databaseAccount().name, accountName: collection && collection.container.databaseAccount && collection.container.databaseAccount().name,
@ -558,7 +558,7 @@ export class CassandraAPIDataClient extends TableDataClient {
authType === AuthType.EncryptedToken authType === AuthType.EncryptedToken
? Constants.CassandraBackend.guestKeysApi ? Constants.CassandraBackend.guestKeysApi
: Constants.CassandraBackend.keysApi; : Constants.CassandraBackend.keysApi;
let endpoint = `${collection.container.extensionEndpoint()}${apiEndpoint}`; let endpoint = `${collection.container.extensionEndpoint()}/${apiEndpoint}`;
const deferred = Q.defer<CassandraTableKeys>(); const deferred = Q.defer<CassandraTableKeys>();
$.ajax(endpoint, { $.ajax(endpoint, {
type: "POST", type: "POST",
@ -613,7 +613,7 @@ export class CassandraAPIDataClient extends TableDataClient {
authType === AuthType.EncryptedToken authType === AuthType.EncryptedToken
? Constants.CassandraBackend.guestSchemaApi ? Constants.CassandraBackend.guestSchemaApi
: Constants.CassandraBackend.schemaApi; : Constants.CassandraBackend.schemaApi;
let endpoint = `${collection.container.extensionEndpoint()}${apiEndpoint}`; let endpoint = `${collection.container.extensionEndpoint()}/${apiEndpoint}`;
const deferred = Q.defer<CassandraTableKey[]>(); const deferred = Q.defer<CassandraTableKey[]>();
$.ajax(endpoint, { $.ajax(endpoint, {
type: "POST", type: "POST",
@ -667,7 +667,7 @@ export class CassandraAPIDataClient extends TableDataClient {
authType === AuthType.EncryptedToken authType === AuthType.EncryptedToken
? Constants.CassandraBackend.guestCreateOrDeleteApi ? Constants.CassandraBackend.guestCreateOrDeleteApi
: Constants.CassandraBackend.createOrDeleteApi; : Constants.CassandraBackend.createOrDeleteApi;
$.ajax(`${explorer.extensionEndpoint()}${apiEndpoint}`, { $.ajax(`${explorer.extensionEndpoint()}/${apiEndpoint}`, {
type: "POST", type: "POST",
data: { data: {
accountName: explorer.databaseAccount() && explorer.databaseAccount().name, accountName: explorer.databaseAccount() && explorer.databaseAccount().name,