bemily-database

0.1.6 • Public • Published

bemily-database

CouchDB views

'user/user'

This view display all user information.

function(doc) {
 if(doc.type == 'user') {
   emit(doc._id, {
    _rev: doc._rev,
    picture: doc.picture,
    name: doc.name, 
    surname: doc.surname,
    mail: doc.mail,
    major: doc.major,
    semester: doc.semester,
    subscribed_groups: doc.subscribed_groups,
    password: doc.password
    });
 }
}

'user/login'

View to display login information.

function(doc) {
 if(doc.type == 'user') {
   emit(doc._id, {
    password: doc.password
   });
 }
}

Tests

Tests can be run with npm test or make test, make test-cov and test-cov-html. Note: npm test points to make test-cov. This is inspired from many hapi plugins.

Readme

Keywords

none

Package Sidebar

Install

npm i bemily-database

Weekly Downloads

2

Version

0.1.6

License

none

Last publish

Collaborators

  • timoweiss
  • t1m1
  • michaelknoch