Commit 5cbf0690 by Kevin Chugh

fix indenting

parent 89e7857c
......@@ -2,14 +2,14 @@ get "#{APIPREFIX}/threads" do # retrieve threads by course
#if a group id is sent, then process the set of threads with that group id or with no group id
if params["group_id"]
threads = CommentThread.any_of(
{:course_id => params["course_id"],:group_id => params[:group_id]},
{:course_id => params["course_id"],:group_id.exists => false},
{:course_id => params["course_id"],:group_id => params[:group_id]},
{:course_id => params["course_id"],:group_id.exists => false},
)
else
threads = CommentThread.where(course_id: params["course_id"])
#else process them all
end
handle_threads_query(threads)
handle_threads_query(threads)
end
get "#{APIPREFIX}/threads/:thread_id" do |thread_id|
......@@ -30,7 +30,7 @@ put "#{APIPREFIX}/threads/:thread_id" do |thread_id|
thread.tags = params["tags"]
thread.save
end
if thread.errors.any?
error 400, thread.errors.full_messages.to_json
else
......
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