take oauthProxy parameter in install and configure routes

part of #6
This commit is contained in:
Girish Ramakrishnan
2016-09-06 21:21:56 -07:00
parent 9a7ac4ffb7
commit b66ba0a2c7
2 changed files with 8 additions and 2 deletions

View File

@@ -124,6 +124,8 @@ function installApp(req, res, next) {
if (data.xFrameOptions && typeof data.xFrameOptions !== 'string') return next(new HttpError(400, 'xFrameOptions must be a string'));
if ('oauthProxy' in data && typeof data.oauthProxy !== 'boolean') return next(new HttpError(400, 'oauthProxy must be a boolean'));
debug('Installing app :%j', data);
apps.install(data, auditSource(req), function (error, app) {
@@ -161,6 +163,8 @@ function configureApp(req, res, next) {
if (data.altDomain && typeof data.altDomain !== 'string') return next(new HttpError(400, 'altDomain must be a string'));
if (data.xFrameOptions && typeof data.xFrameOptions !== 'string') return next(new HttpError(400, 'xFrameOptions must be a string'));
if ('oauthProxy' in data && typeof data.oauthProxy !== 'boolean') return next(new HttpError(400, 'oauthProxy must be a boolean'));
debug('Configuring app id:%s data:%j', req.params.id, data);
apps.configure(req.params.id, data, auditSource(req), function (error) {