This commit is contained in:
2020-05-23 21:34:29 +00:00
parent c4aa695f28
commit df630ba9e9
2 changed files with 6 additions and 2 deletions

View File

@@ -155,7 +155,12 @@ export default {
//no content, nothing to process //no content, nothing to process
return response; return response;
} }
return response.json(); let contentType = response.headers.get("content-type");
// console.log("gzapi::JSON method, content type is:", contentType);
if (contentType && contentType.includes("json")) {
return response.json();
}
return response;
}, },
apiErrorToHumanString(apiError) { apiErrorToHumanString(apiError) {
//empty error object? //empty error object?

View File

@@ -213,7 +213,6 @@ function populateSelectionLists(vm) {
if (res.error) { if (res.error) {
window.$gz.errorHandler.handleFormError(res.error, vm); window.$gz.errorHandler.handleFormError(res.error, vm);
} else { } else {
debugger;
vm.selectLists.serverLogs = res.data; vm.selectLists.serverLogs = res.data;
} }
}); });