Remove fetchJSON being exposed to plugins

* Plugins can directly use send or post method already available
  instead of using fetchJSON which adds extra functionality

Change-Id: Ie0f30f6d8c359ec8f6c40ac7b4ad7e4482ba6940
This commit is contained in:
Dhruv Srivastava
2019-09-13 14:24:42 +02:00
parent b45ac07f09
commit 8f59c92b09

View File

@@ -50,18 +50,6 @@
return getRestApi().getAccountCapabilities(capabilities);
};
GrPluginRestApi.prototype.fetchJSON = function(req) {
// TODO(dhruvsri): find better implementation for fetchJSON
const api = getRestApi();
let fetchJSON;
if (api._fetchJSON) {
fetchJSON = api._fetchJSON.bind(api);
} else {
fetchJSON = api._restApiHelper.fetchJSON.bind(api._restApiHelper);
}
return fetchJSON(req);
};
GrPluginRestApi.prototype.getRepos =
function(filter, reposPerPage, opt_offset) {
return getRestApi().getRepos(filter, reposPerPage, opt_offset);