Skip to content

Commit

Permalink
fix angularjs incorerct parsing of text response
Browse files Browse the repository at this point in the history
  • Loading branch information
GnsP committed Aug 7, 2024
1 parent e14c948 commit fe77bbe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/hydrator/controllers/create/toppanel-ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ class HydratorPlusPlusTopPanelCtrl {
this.myAppsApi.summarize({
namespace: this.$state.params.namespace,
}, pipelineConfig).$promise.then((res) => {
summarySetter(res);
summarySetter(res.summary);
});
}

Expand Down
10 changes: 9 additions & 1 deletion app/services/apps/my-apps-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ angular.module(PKG.name + '.services')
delete: myHelpers.getConfig('DELETE', 'REQUEST', detailPath),
list: myHelpers.getConfig('GET', 'REQUEST', listPath, true),
get: myHelpers.getConfig('GET', 'REQUEST', detailPath),
summarize: myHelpers.getConfig('POST', 'REQUEST', basePath + '/summarize'),
summarize: myHelpers.getConfig('POST', 'REQUEST', basePath + '/summarize',
false, {
responseType: 'text',
transformResponse: function (data) {
return {
summary: data,
};
},
}),
});
});

0 comments on commit fe77bbe

Please sign in to comment.