Skip to content

Commit

Permalink
Merge pull request #695 from sailpoint-oss/fix/get-postman-link
Browse files Browse the repository at this point in the history
fixed function call
  • Loading branch information
philip-ellis-sp authored Dec 4, 2024
2 parents 0834060 + ebcc710 commit 5d24054
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/PostmanLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export default function CMSLinkComponent({children, source}) {
useEffect(() => {
const fetchFileContent = async () => {
try {
const response = await getV2024(siteConfig.customFields.CMS_APP_API_ENDPOINT);
const response = await getItem(siteConfig.customFields.CMS_APP_API_ENDPOINT, source);
//const response = await getItem('https://lyna7x4y34.execute-api.us-east-1.amazonaws.com/Prod/', source);
if (response.id) {
const content = response.Item
setFileContent(content);
} else {
console.error('Error fetching GitHub file:', response.statusText);
console.error('Error fetching GitHub file:', response);
}
} catch (error) {
console.error('Error fetching GitHub file:', error);
Expand Down
2 changes: 1 addition & 1 deletion src/services/CMSService.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function getItem(cmsurl, itemId) {
const response = await fetch(cmsurl + itemId);
return await response.json();
} catch (error) {
return [];
return "";
}
}

0 comments on commit 5d24054

Please sign in to comment.