openedx / frontend-app-discussions

A React-based micro frontend for the Open edX discussion forums.
GNU Affero General Public License v3.0
6 stars 62 forks source link

fix: 400 error editing comment #535

Closed DmytroAlipov closed 1 year ago

DmytroAlipov commented 1 year ago

This is a backport from the master and and this PR

Description

When trying to edit a comment, an error 400 occurred. Provided that the user is a course instructor or staff, and simultaneously the author of the comment.

discussion_mfe_bug_2

The issue is the presence of the editReasonCode parameter in the request.

discussion_mfe_bug_1

This parameter is expected only if the editor is not the author of the comment, and is a staff or instructor.

After the fixes, everything works correctly.

discussion_mfe_fix

Merge Checklist

Post-merge Checklist

openedx-webhooks commented 1 year ago

Thanks for the pull request, @DmytroAlipov! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

codecov[bot] commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (open-release/palm.master@5c6e40b). Click here to learn what that means. Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## open-release/palm.master #535 +/- ## =========================================================== Coverage ? 92.38% =========================================================== Files ? 163 Lines ? 3294 Branches ? 890 =========================================================== Hits ? 3043 Misses ? 232 Partials ? 19 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

awais-ansari commented 1 year ago

@DmytroAlipov Thanks for your contribution. Please resolve the conflict. The Team will review your PR very soon and let you know about it.

DmytroAlipov commented 1 year ago

@awais-ansari done ;)

openedx-webhooks commented 1 year ago

@DmytroAlipov 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.