Correct JSDoc findOrCreate() callback in PersistedModel

Update PersistedModel.findOrCreate() JSDoc to reflect the
callback accepts an additional created boolean parameter.

This is a back-port of pull request #1983 from noderat/patch-1
This commit is contained in:
Miroslav Bajtoš 2016-01-26 13:52:57 +01:00
parent a0a1083564
commit 015e9cb80e
1 changed files with 2 additions and 1 deletions

View File

@ -135,9 +135,10 @@ module.exports = function(registry) {
* <br/>See
* [Where filter](https://docs.strongloop.com/display/LB/Where+filter#Wherefilter-Whereclauseforqueries).
* @param {Object} data Data to insert if object matching the `where` filter is not found.
* @callback {Function} callback Callback function called with `cb(err, instance)` arguments. Required.
* @callback {Function} callback Callback function called with `cb(err, instance, created)` arguments. Required.
* @param {Error} err Error object; see [Error object](http://docs.strongloop.com/display/LB/Error+object).
* @param {Object} instance Model instance matching the `where` filter, if found.
* @param {Boolean} created True if the instance matching the `where` filter was created.
*/
PersistedModel.findOrCreate = function findOrCreate(query, data, callback) {