Skip to content

Commit

Permalink
Fix endpoint for v3 zosmf route
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs committed Mar 21, 2024
1 parent 6f64e13 commit c25d543
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion WebContent/js/utilities/urlUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export function whichServer() {
return server;
}

// zosmf/
const ZOSMF_PREFIX_LENGTH=6;

Check failure on line 24 in WebContent/js/utilities/urlUtils.js

View workflow job for this annotation

GitHub Actions / run-lint

Operator '=' must be spaced

export function atlasFetch(endpoint, content) {
return fetch(`https://${whichServer()}/ibmzosmf/api/v1/${endpoint}`, content);
// In v3, /ibmzosmf/api/v1 endpoint removes /zosmf part of a /zosmf URL, so string must be trimmed.

Check failure on line 27 in WebContent/js/utilities/urlUtils.js

View workflow job for this annotation

GitHub Actions / run-lint

Expected indentation of 4 spaces but found 2
endpoint = endpoint.substring(ZOSMF_PREFIX_LENGTH);

Check failure on line 28 in WebContent/js/utilities/urlUtils.js

View workflow job for this annotation

GitHub Actions / run-lint

Expected indentation of 4 spaces but found 2

Check failure on line 28 in WebContent/js/utilities/urlUtils.js

View workflow job for this annotation

GitHub Actions / run-lint

Assignment to function parameter 'endpoint'
return fetch(`https://${whichServer()}/ibmzosmf/api/v1/${endpoint}`, content);

Check failure on line 29 in WebContent/js/utilities/urlUtils.js

View workflow job for this annotation

GitHub Actions / run-lint

Expected indentation of 4 spaces but found 2
}

0 comments on commit c25d543

Please sign in to comment.