From 321a5bb49a81ac5124e0ee799c167be2f1c97603 Mon Sep 17 00:00:00 2001 From: gaba Date: Wed, 2 Nov 2016 13:53:21 -0700 Subject: [PATCH] statics instead of method. --- models/action.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/action.js b/models/action.js index 139ec2cff..581108a71 100644 --- a/models/action.js +++ b/models/action.js @@ -26,7 +26,7 @@ const ActionSchema = new Schema({ * Finds an action by the id. * @param {String} id identifier of the action (uuid) */ -ActionSchema.methods.findById = function(id) { +ActionSchema.statics.findById = function(id) { return Action.findOne({id}); };