diff --git a/lib/api.ui.js b/lib/api.ui.js index 44cbdbe..ad8a2da 100644 --- a/lib/api.ui.js +++ b/lib/api.ui.js @@ -82,4 +82,22 @@ var getSkin = module.exports.getSkin = function(restCtx, callback) { */ var getSkinVariables = module.exports.getSkinVariables = function(restCtx, tenantAlias, callback) { RestUtil.RestRequest(restCtx, '/api/ui/skin/variables', 'GET', {'tenant': tenantAlias}, callback); -}; \ No newline at end of file +}; + +/** + * Upload a new logo file to use as the tenant logo + * + * @param {RestContext} restCtx Standard REST Context object associated to an administrator. + * @param {Function} fileGenerator A method that returns an open stream to a file + * @param {String} tenantAlias The alias of the tenant for which the variables should be retrieved. + * @param {Function} callback Standard callback method + * @param {Object} callback.err Error object containing error code and error message + * @param {Object} callback.url The variables grouped by their respective groups. + */ +var uploadLogo = module.exports.uploadLogo = function(restCtx, file, tenantAlias, callback) { + var params = { + 'file': file, + 'tenantAlias': tenantAlias + }; + RestUtil.RestRequest(restCtx, '/api/ui/skin/logo', 'POST', params, callback); +};