From 7252c7686cd4f804c47688ee97390436794d5a02 Mon Sep 17 00:00:00 2001 From: Chris Coggburn Date: Thu, 21 Jan 2016 20:40:19 -0700 Subject: [PATCH] Correct JSDoc findOrCreate() callback in PersistedModel Update PersistedModel.findOrCreate() JSDoc to reflect the callback accepts an additional created boolean parameter. --- lib/persisted-model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/persisted-model.js b/lib/persisted-model.js index bcac8e18..5dceeec0 100644 --- a/lib/persisted-model.js +++ b/lib/persisted-model.js @@ -135,9 +135,10 @@ module.exports = function(registry) { *
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) {