Commit 89e7857c by Kevin Chugh

added cohorts to create, read and search

parent ea320fa2
...@@ -16,7 +16,6 @@ get "#{APIPREFIX}/:commentable_id/threads" do |commentable_id| ...@@ -16,7 +16,6 @@ get "#{APIPREFIX}/:commentable_id/threads" do |commentable_id|
end end
post "#{APIPREFIX}/:commentable_id/threads" do |commentable_id| post "#{APIPREFIX}/:commentable_id/threads" do |commentable_id|
puts "**************** commentable_id is #{commentable_id}"
thread = CommentThread.new(params.slice(*%w[title body course_id ]).merge(commentable_id: commentable_id)) thread = CommentThread.new(params.slice(*%w[title body course_id ]).merge(commentable_id: commentable_id))
thread.anonymous = bool_anonymous || false thread.anonymous = bool_anonymous || false
thread.anonymous_to_peers = bool_anonymous_to_peers || false thread.anonymous_to_peers = bool_anonymous_to_peers || false
......
...@@ -117,7 +117,6 @@ class CommentThread < Content ...@@ -117,7 +117,6 @@ class CommentThread < Content
{:term => {:group_id => params["group_id"]}} {:term => {:group_id => params["group_id"]}}
] ]
puts "\n\n\n\n\n*****************-> #{search.filters}"
end end
search.sort {|sort| sort.by sort_key, sort_order} if sort_key && sort_order #TODO should have search option 'auto sort or sth' search.sort {|sort| sort.by sort_key, sort_order} if sort_key && sort_order #TODO should have search option 'auto sort or sth'
......
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