Skip to content

Commit

Permalink
stringify json
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jun 2, 2016
1 parent 66f98fb commit b8a2afa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/app/schema/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ angular.module('fusioApp.schema', ['ngRoute', 'ui.bootstrap'])

.controller('SchemaUpdateCtrl', ['$scope', '$http', '$uibModalInstance', '$uibModal', 'schema', function($scope, $http, $uibModalInstance, $uibModal, schema){

if (typeof schema.source != 'string') {
schema.source = JSON.stringify(schema.source, null, 4);
}

$scope.schema = schema;

$scope.update = function(schema){
Expand Down Expand Up @@ -198,8 +194,12 @@ angular.module('fusioApp.schema', ['ngRoute', 'ui.bootstrap'])

$http.get(fusio_url + 'backend/schema/' + schema.id)
.success(function(data){
if (typeof data.source != 'string') {
data.source = JSON.stringify(data.source, null, 4);
}

$scope.schema = data;
});
});

}])

Expand Down

0 comments on commit b8a2afa

Please sign in to comment.