خرید بک لینک

Vote count: 0

I don't understand why query in javascript retus a result whereas the curl command doesn't :

usersDatabase.query(mapByEmail, {
                key: email,
                include_docs: true
            }).then(function (result) {

                if (!result.rows.length) { //email doesn't exist in DB
                    retu callback(false);
                }
                if (result.rows.length === 1) {
                    retu callback(result);
                }
                console.log("problem : several docs in the DB with same email, run a duplicate check on the DB");
                retu callback(result);
            });

which outputs a big JSON result in the console of my app.

Wheras curl:

    $ curl -u id:pass https://louis.cloudant.com/boardline_users/_design/views/_view/email?key="[email protected]"'

outputs:

{"total_rows":5713,"offset":5713,"rows":[

]}

asked 9 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 29 تير 1395 ساعت: 4:44

صفحه بندی