Skip to content

Commit

Permalink
Fix json syntax error in persona authentication.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtho11 committed Sep 11, 2015
1 parent c979911 commit 61ceb4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/hawkular-ui-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ var hawkularRest;
ws.send('ExecuteOperationRequest=' + JSON.stringify(operation));
};
factory.performAddDeployOperation = function (resourcePath, destinationFileName, fileBinaryContent, authToken, personaId) {
var json = "DeployApplicationRequest={\"resourcePath\": \"" + resourcePath + "\",\n \"destinationFileName\":\"" + destinationFileName + "\"\n \"authentication:\"{\"token\":\"" + authToken + "\", \"persona\":\"" + personaId + "\" } }";
var json = "DeployApplicationRequest={\"resourcePath\": \"" + resourcePath + "\",\n \"destinationFileName\":\"" + destinationFileName + "\",\n \"authentication\": {\"token\":\"" + authToken + "\", \"persona\":\"" + personaId + "\" } }";
var binaryblob = new Blob([json, fileBinaryContent], { type: 'application/octet-stream' });
console.log('DeployApplicationRequest: ' + json);
ws.send(binaryblob);
Expand Down
2 changes: 1 addition & 1 deletion dist/hawkular-ui-service.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ var hawkularRest;
ws.send('ExecuteOperationRequest=' + JSON.stringify(operation));
};
factory.performAddDeployOperation = function (resourcePath, destinationFileName, fileBinaryContent, authToken, personaId) {
var json = "DeployApplicationRequest={\"resourcePath\": \"" + resourcePath + "\",\n \"destinationFileName\":\"" + destinationFileName + "\"\n \"authentication:\"{\"token\":\"" + authToken + "\", \"persona\":\"" + personaId + "\" } }";
var json = "DeployApplicationRequest={\"resourcePath\": \"" + resourcePath + "\",\n \"destinationFileName\":\"" + destinationFileName + "\",\n \"authentication\": {\"token\":\"" + authToken + "\", \"persona\":\"" + personaId + "\" } }";
var binaryblob = new Blob([json, fileBinaryContent], { type: 'application/octet-stream' });
console.log('DeployApplicationRequest: ' + json);
ws.send(binaryblob);
Expand Down
4 changes: 2 additions & 2 deletions src/rest/hawkRest-ops-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ module hawkularRest {
authToken:string,
personaId:string) => {
let json = `DeployApplicationRequest={"resourcePath": "${resourcePath}",
"destinationFileName":"${destinationFileName}"
"authentication:"{"token":"${authToken}", "persona":"${personaId}" } }`;
"destinationFileName":"${destinationFileName}",
"authentication": {"token":"${authToken}", "persona":"${personaId}" } }`;
let binaryblob = new Blob([json, fileBinaryContent], {type: 'application/octet-stream'});
console.log('DeployApplicationRequest: ' + json);
ws.send(binaryblob);
Expand Down

0 comments on commit 61ceb4e

Please sign in to comment.