Skip to content

Commit

Permalink
Rest API changes for adding logos via admin site
Browse files Browse the repository at this point in the history
  • Loading branch information
skarppinen committed Aug 19, 2016
1 parent 8734d88 commit 79b6823
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion lib/api.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
};

/**
* 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);
};

0 comments on commit 79b6823

Please sign in to comment.