Skip to content

Instantly share code, notes, and snippets.

@karlwestin
Created July 15, 2015 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlwestin/5eb1cbe1d5b66587bcea to your computer and use it in GitHub Desktop.
Save karlwestin/5eb1cbe1d5b66587bcea to your computer and use it in GitHub Desktop.
module.exports.getConversationsForUser = function (user, cb) {
db.query(function (doc) {
emit(doc.author, null);
}, {include_docs: true, startkey: user.userId, endkey: user.userId }).then(function (response) {
console.log('response', response)
cb(null, response)
}).catch(function (err) {
cb(err)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment