mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 03:56:37 +00:00
Fix JSON serialization relying on response content
Signed-off-by: Javier Revillas <jrevillas@massivedynamic.io>
This commit is contained in:
committed by
Alex Ellis
parent
6390f66e3e
commit
86c83f0dcd
6
gateway/assets/script/bootstrap.js
vendored
6
gateway/assets/script/bootstrap.js
vendored
@ -59,8 +59,8 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md
|
|||||||
|
|
||||||
$http(options)
|
$http(options)
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
if ($scope.invocation && $scope.invocation.contentType == "json") {
|
if (typeof response.data == 'object') {
|
||||||
$scope.invocationResponse = JSON.stringify(response.data, -1, " ");
|
$scope.invocationResponse = JSON.stringify(response.data, null, 2);
|
||||||
} else {
|
} else {
|
||||||
$scope.invocationResponse = response.data;
|
$scope.invocationResponse = response.data;
|
||||||
}
|
}
|
||||||
@ -205,4 +205,4 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md
|
|||||||
|
|
||||||
fetch();
|
fetch();
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
Reference in New Issue
Block a user