Skip to content

Commit

Permalink
Bugfix: Add the trailing slash when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
swarup-n committed Jan 25, 2024
1 parent ea29eb1 commit ae725aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/providers/object-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default class YamcsObjectProvider {

async #loadTelemetryDictionary() {
const operation = 'parameters?details=yes';
const parameterUrl = this.url + 'api/mdb/' + this.instance + '/' + operation;
const parameterUrl = this.url + '/api/mdb/' + this.instance + '/' + operation;
const url = this.#getMdbUrl('space-systems');
const spaceSystems = await accumulateResults(url, {}, 'spaceSystems', []);
const parameters = await accumulateResults(parameterUrl, {}, 'parameters', []);
Expand All @@ -206,7 +206,7 @@ export default class YamcsObjectProvider {
});

//get any limit overrides and subscribe for subsequent changes
let requestUrl = `${this.url}api/mdb-overrides/${this.instance}/${this.processor}`;
let requestUrl = `${this.url}/api/mdb-overrides/${this.instance}/${this.processor}`;
this.limitOverrides = await getLimitOverrides(requestUrl);
if (this.mdbChangesUnsubscribe === undefined) {
this.mdbChangesUnsubscribe = this.realtimeTelemetryProvider.subscribeToMDBChanges(this.#updateParameterLimits.bind(this));
Expand All @@ -220,11 +220,11 @@ export default class YamcsObjectProvider {
}

#getMdbUrl(operation, name = '') {
return this.url + 'api/mdb/' + this.instance + '/' + operation + name;
return this.url + '/api/mdb/' + this.instance + '/' + operation + name;
}

async #fetchMdbApi(operation, property, abortSignal) {
const mdbURL = `${this.url}api/mdb/${this.instance}/${operation}`;
const mdbURL = `${this.url}/api/mdb/${this.instance}/${operation}`;
const response = await accumulateResults(mdbURL, { signal: abortSignal }, property, []);

return response;
Expand Down

0 comments on commit ae725aa

Please sign in to comment.