Tell us what’s happening:
When I run the tests using Replit, tests 5, 6, 10, 11 and 12 do not pass. When I run them in localhost, only test 11 (PUT request to report thread) does not pass, but it must be bugged , since my functionality is good when I test it on my own.
It is beyond me how I managed to link the wrong Replit, but the test results I mentioned in my post are indeed the ones I got with the anonymous message board project (I re-checked just in case).
Regarding the payload, the “report_id” field’s value seems to be the correct one, and looking at the changes in my MongoDB Atlas confirms that to be the case.
You can send a PUT request to /api/threads/{board} and pass along the thread_id . Returned will be the string reported . The reported value of the thread_id will be changed to true .
Are you sure you are looking at the correct PUT request?
You’re correct. For some reason the tests send the id to report as a “thread_id” field, but the provided webpage sends them as a “report_id”. I was only looking for “report _id”, which is why it worked in my own tests but not in fCC’s. I changed it and now all tests pass on localhost, thanks.
Replit is still failing tests 5, 6, 10, 12. I tried using CodeSandbox instead, and the exact same tests failed. Could this be a problem that stems from my code?