Skip to content

Commit

Permalink
fixed regiser/login
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniespratley committed Dec 8, 2014
1 parent c6a6e19 commit dd7f013
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
ga('send', 'pageview');
</script>

<script src="/socket.io/socket.io.js"></script>
<!--script src="/socket.io/socket.io.js"></script--!>
<!-- bower:js -->
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/es5-shim/es5-shim.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"apiBase": "/api/v2",
"version": "v2",
"security": {"salt": "angular-cms"},
"mongodb": "localhost:27017/angular-cms",
"mongodb": "angularcms:[email protected]:10089/app19632340",
"db": {
"name": "angular-cms",
"username": "amadmin",
Expand Down
16 changes: 8 additions & 8 deletions routes/cms-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
} );

},
Expand Down

0 comments on commit dd7f013

Please sign in to comment.