Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
5cbf0690
Commit
5cbf0690
authored
Jan 25, 2013
by
Kevin Chugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix indenting
parent
89e7857c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
api/comment_threads.rb
+4
-4
No files found.
api/comment_threads.rb
View file @
5cbf0690
...
...
@@ -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
...
...
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