mirror of
https://github.com/wassname/talk.git
synced 2026-07-27 11:28:12 +08:00
statics instead of method.
This commit is contained in:
+1
-1
@@ -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});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user