I get a 403 forbidden when querying my database on Cloudant, with the following error: "temp views are disabled on Cloudant".
Can you help me rewrite the query to avoid this please ?
Thanks
.factory('usersDatabaseRemote', [
'pouchDB',
function (pouchDB) {
'use strict';
var usersDatabaseRemote = pouchDB('https://id:[email protected]/board_users');
return usersDatabaseRemote;
}
])
and :
usersDatabaseRemote.query(mapByEmail, {
key: email,
include_docs: true
}).then(function (result) {
if (!result.rows.length) { //email doesn't exist in DB
return callback(false);
}
if (result.rows.length === 1) {
return callback(result);
}
console.log("problem : several docs in the DB with same email, run a duplicate check on the DB");
return callback(result);
});