Tell us what’s happening:
Hello, guys
I’m working on Anonymous Message Board task using repl.it platform. The thing is that I didn’t make any changes to the existing repl code, just copied the link and run tests. So, some tests passed! Like this one:
You can send a POST request to /api/replies/{board}
with form data including text
, delete_password
, & thread_id
. This will update the bumped_on
date to the comment’s date. In the thread’s replies
array, an object will be saved with at least the properties _id
, text
, created_on
, delete_password
, & reported
.
But I didn’t fill any logic for this test! Is it ok to work like this? I don’t think so. Hope you can help me figure this out
UPD: same result with both repl and glitch platforms - 9 tests are marked as passed WITHOUT any code provided.
UPD 2: 9 tests are marked as passed with any random link provided
Your project link(s)
solution: https://replit.com/@malikaefremova/boilerplate-project-messageboard-2
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Challenge: Anonymous Message Board
Link to the challenge:
hey @berlinsinister welcome to the forum.
If you are looking for where to put your logic then this may help
app.route('/book')
.get(function (req, res) {
res.send('Get a random book')
})
.post(function (req, res) {
res.send('Add a book')
})
.put(function (req, res) {
res.send('Update the book')
})
this is from express routing docs (Express routing )
you can now fill out api.js with logic.
Thanks for the reply.
I have different issue. The tests are passing WITHOUT ANY code. So I’m wondering why.
well sorry for not getting your query but you have a nice bug
it not passes all the tests for me (I’ve provide your replit link)
true, not all the tests, but in my case 9 tests out of 13 are passing :)) though I didn’t code anything yet :))
Sky020
December 29, 2021, 8:17am
6
Hello there,
Some of the tests for some certification projects are not written yet.
It is up to you to follow the user-stories as best you can, and submit an academically honest project.
You can read more here:
opened 01:40PM - 01 Mar 21 UTC
help wanted
scope: curriculum
scope: projects-backend
Currently, the [AMB Project](https://github.com/freeCodeCamp/freeCodeCamp/blob/m… ain/curriculum/challenges/english/09-information-security/information-security-projects/anonymous-message-board.md) has no tests for most of the user-stories.
Discussion can be had within this issue about adding/changing/removing current user-stories. A PR does not need to cover every user-story, but try not to open a PR, if one is already aimed at resolving a specific user-story.
This issue is open for contributions aimed at adding to the user-stories outlined:
- [x] Only allow your site to be loaded in an iFrame on your own pages.
- [x] Do not allow DNS prefetching.
- [x] Only allow your site to send the referrer for your own pages.
- [x] You can send a POST request to /api/threads/{board} with form data including text and delete_password. The saved database record will have at least the fields _id, text, created_on(date & time), bumped_on(date & time, starts same as created_on), reported (boolean), delete_password, & replies (array). [resolved in #41848]
- [ ] You can send a POST request to /api/replies/{board} with form data including text, delete_password, & thread_id. This will update the bumped_on date to the comment's date. In the thread's replies array, an object will be saved with at least the properties _id, text, created_on, delete_password, & reported.
- [ ] You can send a GET request to /api/threads/{board}. Returned will be an array of the most recent 10 bumped threads on the board with only the most recent 3 replies for each. The reported and delete_password fields will not be sent to the client.
- [ ] You can send a GET request to /api/replies/{board}?thread_id={thread_id}. Returned will be the entire thread with all its replies, also excluding the same fields from the client as the previous test.
- [ ] You can send a DELETE request to /api/threads/{board} and pass along the thread_id & delete_password to delete the thread. Returned will be the string incorrect password or success.
- [ ] You can send a DELETE request to /api/replies/{board} and pass along the thread_id, reply_id, & delete_password. Returned will be the string incorrect password or success. On success, the text of the reply_id will be changed to [deleted].
- [ ] You can send a PUT request to /api/threads/{board} and pass along the thread_id. Returned will be the string success. The reported value of the thread_id will be changed to true.
- [ ] You can send a PUT request to /api/replies/{board} and pass along the thread_id & reply_id. Returned will be the string success. The reported value of the reply_id will be changed to true.
- [ ] All 10 functional tests are complete and passing.
An issue with the _help wanted_ or _first timers only_ label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors.
If you would like to contribute, and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/
If you have any issues with contributing, be sure to join us on the [contributors channel](https://chat.freecodecamp.org/channel/contributors), or on the [contributors sub-forum](https://forum.freecodecamp.org/c/contributors/3)
Hope this clarifies
Thanks, this makes things a lot more clear!
Guess same was with the first task Stock Price Checker . But there was only ONE test passing by default, let’s call it this way. Right?
system
Closed
June 29, 2022, 9:58pm
8
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.