Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Test errors, Removes Node 4.0.0, 4.4.5 from testing and Fix: new user creation #258

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: node_js
services:
- mongodb
node_js:
- "4.0.0"
- "4.4.5"
- "4.5.0"
- "5.4.1"
- "6.2"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"eslint-plugin-standard": "^2.0.0",
"jsdom": "^9.4.1",
"mocha": "^2.5.3",
"mocha-jsdom": "^1.1.0",
"mocha-jsdom": "~1.1.0",
"supertest": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ router.post('/users/:conn/:db/user_create', function (req, res, next){
var roles = req.body.roles_text ? req.body.roles_text.split(/\s*,\s*/) : [];

// Add a user
mongo_db.addUser(req.body.username, req.body.user_password, {'roles': roles}, function (err, user_name){
mongo_db.command({ createUser: req.body.username, pwd: req.body.user_password, 'roles': roles }, function (err, user_name){
if(err){
console.error('Error creating user: ' + err);
res.status(400).json({'msg': req.i18n.__('Error creating user') + ': ' + err});
Expand Down