Skip to content

Commit 6f20908

Browse files
committed
Admin+ _since for Groups
Applies to OpenUserJS#93
1 parent 290ab64 commit 6f20908

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

models/group.js

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ var groupSchema = new Schema({
2020
size: { type: Number, default: 0 }
2121
});
2222

23+
groupSchema.virtual('_since').get(function () {
24+
return this._id.getTimestamp();
25+
});
26+
2327
var Group = mongoose.model('Group', groupSchema);
2428

2529
exports.Group = Group;

0 commit comments

Comments
 (0)