Information Security And Quality Assurance Certification - Empty body for first chai-http POST request test

Greetings! I’m currently working on the Issue Tracker project for the Information Security And Quality Assurance Certification, and while I’m able to create new documents in my database that have the correct properties, when I run the first chai-http test, the body of the POST request is empty. If the actual program is sending the request, I’m not sure why Chai doesn’t seem to detect it:

test('Every field filled in', function(done) {
       chai.request(server)
        .post('/api/issues/main')
        .send({
          issue_title: 'Title',
          issue_text: 'text',
          created_by: 'Functional Test - Every field filled in',
          assigned_to: 'Chai and Mocha',
          status_text: 'In QA',
          created_on: new Date(),
          updated_on: new Date(),
          open: true
        })
        .end(function(err, res){
          assert.equal(res.status, 200);
          console.log(res);
          done();
        });
      });

Here’s my Glitch project: pyrite-club . glitch . me.

Did you figure it out? I’m currently having the same problem.
The response’s body and text from the callback are set to empty strings, even tough I’m sending json objects as response inside the api.

I have tried updating the packages for chai and body-parser, and also checked to see if server.js was using app.use(bodyParser.json()). But everything seems to be fine tough :frowning:

edit:
Oops, my api endpoint for post was wrong. I was actually sending an undefined object as response:

db.collection('issues').insertOne(
  new_issue, {},
  (err, doc) => {
    if(err)
      return res.send(err);
    return res.json(doc.value);
});

With a little search at the mongodb docs, I found out that instead of doc.value I should use doc.ops (MongoDB v3.1.13):

db.collection('issues').insertOne(
  new_issue, {},
  (err, doc) => {
    if(err)
      return res.send(err);
    return res.json(doc.ops[0]);
});

It was nothing wrong with Chai or FCC, but a mistake in my part using mongodb’s docs.