docparse-user-in-upload

Test if a given user is an owner of a given upload

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

Docparse Upload Fetch

Test if a given user is an owner of a given upload. The user should be an instance of docparse-user. The upload should be an instance of docparse-upload.

Build Status Dependency Status Dependency tracking by David

Usage

var inspect = require('eyespect').inspector();
var userInUpload = require('docparse-user-in-upload');
var data = {
  upload: {} // this should be an instance of docparse-upload
  userID: {} // this should be a _id ObjectId for a docparse-user instance
}
userInUpload(data, function(err, reply) {
  if(err) {
    inspect(err, 'error fetching upload);
    return;
  }
  inspect(reply, 'is user in upload?');
});

Installation

npm install docparse-user-in-upload

npm loves you