Commit 5615c726 by Rocky Duan

sort by last activity

parent 08730918
......@@ -33,6 +33,7 @@ get "#{api_prefix}/search/threads" do
sort_key_mapper = {
"date" => :created_at,
"activity" => :last_activity_at,
"votes" => :votes_point,
"comments" => :comment_count,
}
......@@ -87,6 +88,7 @@ get "#{api_prefix}/:commentable_id/threads" do |commentable_id|
sort_key_mapper = {
"date" => :created_at,
"activity" => :last_activity_at,
"votes" => :"votes.point",
"comments" => :comment_count,
}
......
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