From f8ac9b3e4c9427e758365b79a4cc273ec31c0baf Mon Sep 17 00:00:00 2001 From: "Didier Villevalois (Ptitjes)" Date: Sun, 12 Nov 2017 18:26:45 +0100 Subject: [PATCH] (#127,#130,#141) correctly set ajax request's body for login --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index c55846a..c8ce693 100644 --- a/lib/index.js +++ b/lib/index.js @@ -93,7 +93,7 @@ exports.login = pouchdbUtils.toPromise(function (username, password, opts, callb method : 'POST', url : utils.getSessionUrl(db), headers : {'Content-Type': 'application/json'}, - body : JSON.stringify({name: username, password: password}) + body : {name: username, password: password} }, opts.ajax || {}); pouchdbAjax(ajaxOpts, wrapError(callback)); });