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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user