Commit e37b3296 by Rocky Duan

return timestamp information

parent 3fcbf337
...@@ -47,7 +47,7 @@ class Comment < Content ...@@ -47,7 +47,7 @@ class Comment < Content
if params[:recursive] if params[:recursive]
self.class.hash_tree(subtree(sort: sort_by_parent_and_time)).first self.class.hash_tree(subtree(sort: sort_by_parent_and_time)).first
else else
as_document.slice(*%w[body course_id endorsed _id]). as_document.slice(*%w[body course_id endorsed _id updated_at]).
merge("user_id" => author.id). merge("user_id" => author.id).
merge("votes" => votes.slice(*%w[count up_count down_count point])) merge("votes" => votes.slice(*%w[count up_count down_count point]))
end end
......
...@@ -37,7 +37,7 @@ class CommentThread < Content ...@@ -37,7 +37,7 @@ class CommentThread < Content
end end
def to_hash(params={}) def to_hash(params={})
doc = as_document.slice(*%w[title body course_id _id]). doc = as_document.slice(*%w[title body course_id _id updated_at]).
merge("user_id" => (author.id if author)). merge("user_id" => (author.id if author)).
merge("votes" => votes.slice(*%w[count up_count down_count point])) merge("votes" => votes.slice(*%w[count up_count down_count point]))
if params[:recursive] if params[:recursive]
......
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