From 45d0e0b4c32af71ce60dc1108001b2b2656f7575 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sun, 3 Sep 2017 17:22:57 -0700 Subject: [PATCH] Guard unfinished web route with env variable --- src/web/webserver.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/web/webserver.js b/src/web/webserver.js index db3563f7..72bc6c83 100644 --- a/src/web/webserver.js +++ b/src/web/webserver.js @@ -257,11 +257,13 @@ module.exports = { require('./routes/google_drive_userscript')(app); require('./routes/ustream_bypass')(app); - const { AccountDataRoute } = require('./routes/account/data'); - require('@calzoneman/express-babel-decorators').bind( - app, - new AccountDataRoute(accountDB, channelDB, csrfVerify, verifySessionAsync) - ); + if (process.env.UNFINISHED_FEATURE) { + const { AccountDataRoute } = require('./routes/account/data'); + require('@calzoneman/express-babel-decorators').bind( + app, + new AccountDataRoute(accountDB, channelDB, csrfVerify, verifySessionAsync) + ); + } app.use(serveStatic(path.join(__dirname, '..', '..', 'www'), { maxAge: webConfig.getCacheTTL()