Commit 4b17b950 authored by strong's avatar strong

Merge branch 'remould_1214_api_optimize' into SANDBOX

parents 585ec733 b5c4418a
......@@ -11,6 +11,7 @@ var async = require('async');
var then = require('thenjs');
var listThreadFields = {
content:1,
type:1,
title:1,
......@@ -24,6 +25,8 @@ var listThreadFields = {
comments:1,
level:1,
top:1,
tag:1,
tag_top:1,
pv_count:1,
address:1
......@@ -43,6 +46,8 @@ var singleThreadFields = {
images:1,
level:1,
top:1,
tag:1,
tag_top:1,
pv_count:1,
address:1
......@@ -733,7 +738,7 @@ function getAllThreadByFidHelp(conditions, pageNo, pageSize, sort, callback) {
if (sort) {
sortBy = sort;
}
ForumThread.find(conditions,listThreadFields).populate('from', 'uid mid nickName icon').populate('info','name icon pv_count').populate({
ForumThread.find(conditions).populate('from', 'uid mid nickName icon').populate('info','name icon pv_count').populate({
path: 'tag',select: 'title pv_count'
}).populate({
path: 'comments',
......@@ -800,7 +805,7 @@ function getAllThreadByFidHelpNoLimit(conditions, pageNo, pageSize, sort, callba
if (sort) {
sortBy = sort;
}
ForumThread.find(conditions,listThreadFields).populate('from','uid mid nickName icon').populate('info','name icon pv_count').populate({
ForumThread.find(conditions).populate('from','uid mid nickName icon').populate('info','name icon pv_count').populate({
path: 'tag',select: 'title pv_count'
}).populate({
path: 'comments',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment