Skip to content

Commit

Permalink
Merge pull request #288 from suvarnakale/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-2347 feat : event handling in players in admin app
  • Loading branch information
itsvick authored Oct 30, 2024
2 parents ef53628 + 1b41cc7 commit f9a06f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pages/players.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ const playerConfig = {
{ id: "org.sunbird.player.endpage", ver: 1.1, type: "plugin" },
],
sideMenu: {
showShare: true,
showShare: false,
showDownload: true,
showExit: true,
showPrint: true,
showPrint: false,
showReplay: true,
},
},
Expand Down
6 changes: 3 additions & 3 deletions src/services/PlayerService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const fetchContent = async (identifier: any) => {
`${API_URL}?fields=${FIELDS}&mode=${MODE}&licenseDetails=${LICENSE_DETAILS}`
);
console.log("response =====>", response);
return response.data.result.content;
return response?.data?.result?.content;
} catch (error) {
console.error("Error fetching content:", error);
throw error;
Expand All @@ -23,7 +23,7 @@ export const getHierarchy = async (identifier: any) => {
const API_URL = `${process.env.NEXT_PUBLIC_WORKSPACE_BASE_URL}${URL_CONFIG.API.HIERARCHY_API}${identifier}`;
const response = await axios.get(API_URL);
console.log("response =====>", response);
return response.data.result;
return response?.data?.result?.content || response?.data?.result;
} catch (error) {
console.error("Error fetching content:", error);
throw error;
Expand All @@ -36,7 +36,7 @@ export const getQumlData = async (identifier: any) => {
const FIELDS = URL_CONFIG.PARAMS.HIERARCHY_FEILDS;
const response = await axios.get(`${API_URL}?fields=${FIELDS}`);
console.log("response =====>", response);
return response.data.result;
return response?.data?.result?.content || response?.data?.result;
} catch (error) {
console.error("Error fetching content:", error);
throw error;
Expand Down

0 comments on commit f9a06f6

Please sign in to comment.