statics instead of method.

This commit is contained in:
gaba
2016-11-02 13:53:21 -07:00
parent 94ade6f6fe
commit 321a5bb49a
+1 -1
View File
@@ -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});
};