Skip to content

Commit

Permalink
whitespace correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Yauheniya Taleika committed Nov 13, 2024
1 parent 967df61 commit 8312ba9
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions modules/quanthub_core/js/qh_core-power-bi-customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ function checkTokenAndUpdate($, context) {
function updateToken($, context) {
console.log('updating embed token');
$.ajax({
type: "POST",
dataType: "json",
contentType: "application/json",
processData: false,
url: `/powerbi/embedconfig/${context.reportId}`,
data: JSON.stringify({ extraDatasets: context.extraDatasets }),
headers: { 'Content-Type': 'application/json' },
error: (request, error) => {
console.error(error);
context.tokenExpiration = null;
},
success: async (response) => {
context.tokenExpiration = response.embed_token.expiration;
await context.report.setAccessToken(response.embed_token.token)
}
type: "POST",
dataType: "json",
contentType: "application/json",
processData: false,
url: `/powerbi/embedconfig/${context.reportId}`,
data: JSON.stringify({ extraDatasets: context.extraDatasets }),
headers: {'Content-Type': 'application/json'},
error: (request, error) => {
console.error(error);
context.tokenExpiration = null;
},
success: async (response) => {
context.tokenExpiration = response.embed_token.expiration;
await context.report.setAccessToken(response.embed_token.token)
}
});
}

Expand All @@ -56,8 +56,8 @@ function powerbi_embed_customizeReport($, context, title = '', name = '') {

checkTokenAndUpdate($, context);
setInterval(() => {
checkTokenAndUpdate($, context);
},
checkTokenAndUpdate($, context);
},
INTERVAL_TIME
);

Expand Down

0 comments on commit 8312ba9

Please sign in to comment.