Skip to content

Commit

Permalink
Merge pull request #32 from sallakarppinen/issue-1296
Browse files Browse the repository at this point in the history
Rest API changes for adding logos via admin site
  • Loading branch information
brecke authored Jan 25, 2017
2 parents 8c536ad + 79b6823 commit fb5b264
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 fb5b264

Please sign in to comment.