Merge pull request #371 from strongloop/jsdocs-fix
Split out aliases for deleteById and destroyAll functions for jsdoc.
This commit is contained in:
commit
a071895723
|
@ -221,24 +221,42 @@ setRemoting(DataModel.findOne, {
|
|||
* @param {Function} [cb] - callback called with (err)
|
||||
*/
|
||||
|
||||
DataModel.remove =
|
||||
DataModel.deleteAll =
|
||||
DataModel.destroyAll = function destroyAll(where, cb) {
|
||||
throwNotAttached(this.modelName, 'destroyAll');
|
||||
};
|
||||
|
||||
/**
|
||||
* Alias for `destroyAll`
|
||||
*/
|
||||
|
||||
DataModel.remove = DataModel.destroyAll;
|
||||
|
||||
/**
|
||||
* Alias for `destroyAll`
|
||||
*/
|
||||
DataModel.deleteAll = DataModel.destroyAll;
|
||||
|
||||
|
||||
/**
|
||||
* Destroy a record by id
|
||||
* @param {*} id The id value
|
||||
* @param {Function} cb - callback called with (err)
|
||||
*/
|
||||
|
||||
DataModel.removeById =
|
||||
DataModel.deleteById =
|
||||
DataModel.destroyById = function deleteById(id, cb) {
|
||||
throwNotAttached(this.modelName, 'deleteById');
|
||||
};
|
||||
|
||||
/**
|
||||
* Alias for deleteById
|
||||
*/
|
||||
DataModel.deleteById = DataModel.destroyById;
|
||||
|
||||
/**
|
||||
* Alias for deleteById
|
||||
*/
|
||||
DataModel.removeById = DataModel.destroyById;
|
||||
|
||||
// deleteById ~ remoting attributes
|
||||
setRemoting(DataModel.deleteById, {
|
||||
description: 'Delete a model instance by id from the data source',
|
||||
|
|
Loading…
Reference in New Issue