mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-23 07:42:23 +01:00
feat(forums): add new fields lastNewTopic & lastNewTopic in mode
This commit is contained in:
@@ -39,7 +39,8 @@ exports.create = function (req, res) {
|
||||
exports.list = function (req, res) {
|
||||
Forum.find()
|
||||
.sort('order -createdat')
|
||||
.populate('lastTopic')
|
||||
.populate('lastNewTopic')
|
||||
.populate('lastReplyTopic')
|
||||
.populate('moderators', 'username displayName profileImageURL uploaded downloaded')
|
||||
.exec(function (err, forums) {
|
||||
if (err) {
|
||||
@@ -163,7 +164,8 @@ exports.forumByID = function (req, res, next, id) {
|
||||
}
|
||||
|
||||
Forum.findById(id)
|
||||
.populate('lastTopic')
|
||||
.populate('lastNewTopic')
|
||||
.populate('lastReplyTopic')
|
||||
.populate('moderators', 'username displayName profileImageURL uploaded downloaded')
|
||||
.exec(function (err, forum) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user