Skip to content

Commit

Permalink
use node comptatible API for json
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericgermain committed Sep 25, 2017
1 parent 8065c8b commit fc3d6c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ exports.login = utils.toPromise(function (username, password, opts, callback) {
var ajaxOpts = utils.extend(true, {
method : 'POST',
url : utils.getSessionUrl(db),
headers : {'Content-Type': 'application/json'},
body : JSON.stringify({name: username, password: password})
json: true,
body : {name: username, password: password}
}, opts.ajax || {});
utils.ajax(ajaxOpts, wrapError(callback));
});
Expand Down

0 comments on commit fc3d6c1

Please sign in to comment.