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
b1d02ca4
Commit
b1d02ca4
authored
Apr 02, 2015
by
张淼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c1f30770
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
forumThread.js
app/models/forumThread.js
+5
-0
forumThreadService.js
app/service/forumThreadService.js
+1
-1
No files found.
app/models/forumThread.js
View file @
b1d02ca4
...
...
@@ -42,6 +42,11 @@ var ForumThreadSchema = new Schema({
},
icon
:
{
//话题图标
type
:
String
},
address
:
{
//地址
country
:{
type
:
String
,
default
:
''
},
province
:{
type
:
String
,
default
:
''
},
city
:{
type
:
String
,
default
:
''
},
},
order_idx
:
{
//论坛排序
type
:
Number
,
...
...
app/service/forumThreadService.js
View file @
b1d02ca4
...
...
@@ -152,7 +152,7 @@ function populateComment(doc, callback){
var
asyncTasks
=
[];
doc
.
comments
.
forEach
(
function
(
comment
){
asyncTasks
.
push
(
function
(
callback
)
{
ForumComment
.
populate
(
comment
,
{
path
:
'from to'
,
select
:
'uid nickName icon comments'
}
,
function
(
err
,
c
){
ForumComment
.
populate
(
comment
,
{
path
:
'from to'
,
select
:
'uid nickName icon
displayName displayIcon
comments'
}
,
function
(
err
,
c
){
if
(
err
)
{
console
.
error
(
err
);
callback
(
null
,
null
);
...
...
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