Stuck on my Issue Tracker project

Tell us what’s happening:
I’ve been stuck for a few days on my project. All my tests seem fine on my side but my project doesn’t pass the PUT and DELETE tests (except the “missing _id” PUT test).

I’ve fixed many little things on trying to see what’s wrong but I’m now really stuck. Could you please help me see what’s the pb in my code ? What should I do differently ?

Thank you :pray:

Your project link(s)

solution: https://replit.com/@n0r314/boilerplate-project-issuetracker

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0

Challenge: Issue Tracker

Link to the challenge:

No one to help ? Here is my DELETE function if it helps

.delete(function(req, res) {
      let project = req.params.project;
      if (req.body['_id']) {
        var issueId = req.body['_id']
      } else {
        return res.json({
          error: 'missing _id'
        });
      }
      Issue.deleteOne({ project_name: project, '_id': issueId }, function(err) {
        if (err) return res.json({
          error: 'could not delete',
          '_id': issueId
        });
        console.log("One issue deleted in project " + project);
        return res.json({
          result: 'successfully deleted',
          '_id': issueId
        });
      });
    });

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.