Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
4b17b950
Commit
4b17b950
authored
Dec 17, 2015
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'remould_1214_api_optimize' into SANDBOX
parents
585ec733
b5c4418a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
forumThreadService.js
app/service/forumThreadService.js
+7
-2
No files found.
app/service/forumThreadService.js
View file @
4b17b950
...
@@ -11,6 +11,7 @@ var async = require('async');
...
@@ -11,6 +11,7 @@ var async = require('async');
var
then
=
require
(
'thenjs'
);
var
then
=
require
(
'thenjs'
);
var
listThreadFields
=
{
var
listThreadFields
=
{
content
:
1
,
content
:
1
,
type
:
1
,
type
:
1
,
title
:
1
,
title
:
1
,
...
@@ -24,6 +25,8 @@ var listThreadFields = {
...
@@ -24,6 +25,8 @@ var listThreadFields = {
comments
:
1
,
comments
:
1
,
level
:
1
,
level
:
1
,
top
:
1
,
top
:
1
,
tag
:
1
,
tag_top
:
1
,
pv_count
:
1
,
pv_count
:
1
,
address
:
1
address
:
1
...
@@ -43,6 +46,8 @@ var singleThreadFields = {
...
@@ -43,6 +46,8 @@ var singleThreadFields = {
images
:
1
,
images
:
1
,
level
:
1
,
level
:
1
,
top
:
1
,
top
:
1
,
tag
:
1
,
tag_top
:
1
,
pv_count
:
1
,
pv_count
:
1
,
address
:
1
address
:
1
...
@@ -733,7 +738,7 @@ function getAllThreadByFidHelp(conditions, pageNo, pageSize, sort, callback) {
...
@@ -733,7 +738,7 @@ function getAllThreadByFidHelp(conditions, pageNo, pageSize, sort, callback) {
if
(
sort
)
{
if
(
sort
)
{
sortBy
=
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'
path
:
'tag'
,
select
:
'title pv_count'
}).
populate
({
}).
populate
({
path
:
'comments'
,
path
:
'comments'
,
...
@@ -800,7 +805,7 @@ function getAllThreadByFidHelpNoLimit(conditions, pageNo, pageSize, sort, callba
...
@@ -800,7 +805,7 @@ function getAllThreadByFidHelpNoLimit(conditions, pageNo, pageSize, sort, callba
if
(
sort
)
{
if
(
sort
)
{
sortBy
=
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'
path
:
'tag'
,
select
:
'title pv_count'
}).
populate
({
}).
populate
({
path
:
'comments'
,
path
:
'comments'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment