docparse-upload-add-user

Add a user to an existing upload

npm install docparse-upload-add-user
12 downloads in the last month

Docparse Upload Add-User

Add a user to an existing upload. The user should be an instance of a docparse-user and the upload should be an instance of docparse-upload

Build Status Dependency Status Dependency tracking by David

Usage

var inspect = require('eyespect').inspector();
var addUser = require('docparse-upload-add-user');
var data = {
  hash: 'foo hash',
  userID: 'foo id' // this should be an _id ObjectId of a docparse-user instance
  upload: {}       // this should be an instance of docparse-upload
}
addUser(data, function(err, reply) {
  if(err) {
    inspect(err, 'error adding user);
    return;
  }
  inspect(reply.toObject(), 'upload after adding user');
});

Installation

npm install docparse-upload-add-user

npm loves you