Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove DEFAULT_USER from cornfield [#614]

  • Loading branch information...
commit 71c3e46249e5c837517b26f6faad5c6a75e69471 1 parent d698f4f
@jbuck authored
Showing with 2 additions and 17 deletions.
  1. +2 −13 cornfield/app.js
  2. +0 −4 cornfield/config/default.json
View
15 cornfield/app.js
@@ -9,19 +9,11 @@ const express = require('express'),
TEMPLATES_DIR = CONFIG.dirs.templates,
PUBLISH_DIR = CONFIG.dirs.publish,
PUBLISH_PREFIX = CONFIG.dirs.publishPrefix,
- ENVIRONMENT = CONFIG.environment || {},
- MODE = ENVIRONMENT.mode || "production",
WWW_ROOT = path.resolve(CONFIG.dirs.wwwRoot || __dirname + "/.."),
TEMPLATES = CONFIG.templates || {};
-var DEFAULT_USER = null,
- canStoreData = true;
+var canStoreData = true;
-if( MODE === "development" ){
- DEFAULT_USER = ENVIRONMENT.defaultUser;
-}
-
-console.log( "Environment: ", MODE );
console.log( "Templates Dir:", TEMPLATES_DIR );
console.log( "Publish Dir:", PUBLISH_DIR );
@@ -66,7 +58,7 @@ app.use(express.logger(CONFIG.logger))
require('express-browserid').plugAll(app);
function publishRoute( req, res ){
- var email = req.session.email || DEFAULT_USER,
+ var email = req.session.email,
id = req.params.id;
if (!email) {
@@ -121,9 +113,6 @@ function publishRoute( req, res ){
});
}
-if( MODE === "development" ){
- app.get('/publish/:id', publishRoute );
-}
app.post('/publish/:id', publishRoute );
app.get('/projects', function(req, res) {
View
4 cornfield/config/default.json
@@ -15,10 +15,6 @@
"publish": "view",
"publishPrefix": "http://localhost:8888/cornfield/view"
},
- "environment": {
- "mode": "development",
- "defaultUser": "secretrobotron@gmail.com"
- },
"templates": {
"default-butter-test": {
"../external/popcorn-js/": "http://localhost:8888/external/popcorn-js/"
Please sign in to comment.
Something went wrong with that request. Please try again.