diff --git a/app/index.html b/app/index.html
index a9d41e4..1d38fd7 100755
--- a/app/index.html
+++ b/app/index.html
@@ -91,7 +91,7 @@
ga('send', 'pageview');
-
+
diff --git a/config/config.json b/config/config.json
index 44113dd..ee1081f 100644
--- a/config/config.json
+++ b/config/config.json
@@ -4,7 +4,7 @@
"apiBase": "/api/v2",
"version": "v2",
"security": {"salt": "angular-cms"},
- "mongodb": "localhost:27017/angular-cms",
+ "mongodb": "angularcms:angularcms@paulo.mongohq.com:10089/app19632340",
"db": {
"name": "angular-cms",
"username": "amadmin",
diff --git a/routes/cms-auth.js b/routes/cms-auth.js
index e876872..b9856f2 100644
--- a/routes/cms-auth.js
+++ b/routes/cms-auth.js
@@ -80,18 +80,18 @@ module.exports = function (config, app) {
//Try and find user
User.find( data, function (err, u) {
+ console.log(err, u);
if (u) {
res.json( 400, {message: 'Username already exists!'} );
- } else {
- user.save( function (err, ok) {
- if (err) {
- res.json( 400, {message: 'Problem registering!'} );
- } else {
- res.json( 200, ok );
- }
- } );
}
+ } );
+ user.save( function (err, ok) {
+ if (err) {
+ res.json( 400, {message: 'Problem registering!'} );
+ } else {
+ res.json( 200, ok );
+ }
} );
},