Remove unused code

This commit is contained in:
Johannes Zellner
2020-02-05 17:26:48 +01:00
parent 9283537efc
commit 5996ea1ba3

View File

@@ -1763,24 +1763,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
window.location.href = client.apiOrigin + '/api/v1/cloudron/logout?access_token=' + token;
};
// this is ununsed because webadmin uses implicit grant flow
Client.prototype.exchangeCodeForToken = function (code, callback) {
var data = {
grant_type: 'authorization_code',
code: code,
redirect_uri: window.location.protocol + '//' + window.location.host,
client_id: this._clientId,
client_secret: this._clientSecret
};
post('/api/v1/oauth/token?response_type=token&client_id=' + this._clientId, data, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.access_token);
});
};
Client.prototype.uploadFile = function (appId, file, progressCallback, callback) {
var fd = new FormData();
fd.append('file', file);