cs_comments_service
cs_comments_service copied to clipboard
[BD-38][INF-544][BB-6682] feat: implement reverse_order parameter
Description
- Added
reverse_orderquery parameter to the threads endpoint. - Modified
merge_response_contentto support reversed content order.
Testing instructions
- Open Discussion for some course.
- Create a discussion, add two responses, add comments for both of them.
- Specify the thread ID (you can find it in the address bar) and course ID, and run the following (httpie used):
You should see a thread with comments ordered by the creation date.http http://127.0.0.1:4567/api/v1/threads/<YOUR_THREAD_ID> "X-EDX-API-KEY: forumapikey" course_id==<YOUR_COURSE_ID> with_responses==True user_id==4 mark_as_read==False recursive==True resp_skip==0 reverse_order==false - Run the command from the previous point, but change
reverse_order==falsetoreverse_order==true. You should see threads and comments in the reversed order. - You can specify
resp_limit==1to verify that the reverse ordering works with pagination.
Thanks for the pull request, @0x29a!
When this pull request is ready, tag your edX technical lead.
@0x29a can you please rebase this?
@asadazam93, done.
@0x29a 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.