server/lib/master/index.js
//Loads a new element into db (for self entered).
Loads a new element into db (for self entered).
Loads a new element into db ( for self entered ) .
function putMaster(request, response, element) {
  db = app.get("db_conn");
  db.collection(element, function(err, coll) {
    if (err) {
      throw err;
    }
    coll.insert(request.body, {
      safe: true
    }, function(err, results) {
      if (err) {
        throw err;
      }
      response.statusCode = 200;
      response.end();
    });
  });
}
function putMaster ( request , response , element ) { db = app . get ( "db_conn" ) ; db . collection ( element , function ( err , coll ) { if ( err ) { throw err ; } coll . insert ( request . body , { safe : true } , function ( err , results ) { if ( err ) { throw err ; } response . statusCode = 200 ; response . end ( ) ; } ) ; } ) ; }
Loads a new element into db (for self entered).
Loads a new element into db ( for self entered ) .
//console.log('record saved');