CleverStack/node-seed

View on GitHub
lib/utils/model/helpers/findOptions/valid.js

Summary

Maintainability
A
0 mins
Test Coverage
var Exceptions = require('exceptions');

module.exports = function findOptionsAreValid(findOptions, callback) {
  if (!findOptions) {
    callback(new Exceptions.InvalidData('You must specify either an id or an object containing fields to find a %s'));
  } else {
    callback(null);
  }
};