mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-28 16:11:54 +00:00
can read and display workouts
This commit is contained in:
@@ -9,7 +9,7 @@ var UserSchema = new mongoose.Schema({
|
||||
|
||||
UserSchema.methods.recentworkouts = function(callback) {
|
||||
return this.model('workout')
|
||||
.find({author: this._id})
|
||||
.find({userID: this._id})
|
||||
//.sort('created_at', 1)
|
||||
.limit(5)
|
||||
.exec(callback);
|
||||
|
||||
Reference in New Issue
Block a user