Passing criteria is not clear!

What is your hint or solution suggestion?
The instruction for Exercise Tracker might need some work. There is no clear passing criteria, especially the 3rd one.A screen shot of what is expected would be nice.

Challenge: Exercise Tracker

Link to the challenge:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Welcome, thomas.

It is difficult to debug your code, without a link to your project. Would you mind sharing it?

We are aware of the issue with clarity in this project, and fixes are on the way. I do recommend you take a look at the fCC repo where you can find/report issues with the platform/content.

Further, I recommend you take a look at the tests:

I realise this is not ideal, but we cannot help you more than you can help yourself.

Hope this is useful.


Thank you for your prompt reply, and please find the code of my project. Sorry about the messy code, I tried to clean it up as much as possible. But I’m still new to this.

const express = require('express')
const app = express()
const bodyParser = require('body-parser')

app.use(bodyParser.urlencoded({extended: false}))

const cors = require('cors')

const mongodb = require('mongodb')
const mongoose = require('mongoose')

const connect = mongoose.connect(process.env.mongoUrl, {useUnifiedTopology: true, useNewUrlParser: true
}, function(err){
  console.log('connected to db, and cleaned db')
mongoose.set('useCreateIndex', true);

const userSchema = new mongoose.Schema({
  username: String
const exerciseSchema = new mongoose.Schema({
  username: {type: String, required: true},
  description: {type: String, required: true},
  duration: {type: Number,required: true},
  userId: {type: String,required: true,},
  date: {type: String,required: true,default: (new Date()).toDateString()}

const User = new mongoose.model('User', userSchema);
const Exercise = new mongoose.model('Exercise', exerciseSchema);


app.get('/', (req, res) => {
  res.sendFile(__dirname + '/views/index.html')
});'/api/exercise/new-user', (req, res)=>{
  const username = req.body.username;
  new User({
    username: username
  }).save((err, results)=>{
      } else{
      res.json({'username': results.username, '_id':results._id})

app.get('/api/exercise/users', async (req, res)=>{
 await User.find({}, (err, data)=>{
    } else{
      const arr = []
      data.forEach(obj=> arr.push(obj.username))
})'/api/exercise/add', async(req, res)=>{
  const userId = req.body.userId
  const description = req.body.description
  const duration = req.body.duration
  const dateString = (new Date(
  await User.findOne({_id: userId}, (err, data)=>{
    } else{
        new Exercise({
        username: data.username,
        description: description,
        duration: parseInt(duration),
        userId: userId,
        date: dateString
      }).save((err, data)=>{
        } else{
          res.json({'_id':data.userId, 'username': data.username, 'date':, 'duration': data.duration, 'description':data.description})

app.get('/api/exercise/log', async (req, res)=>{
    const id = req.query.userId
    const from = req.query.from
    const to =
    const limit = req.query.limit

    Exercise.find({userId: id}, ((err, data)=>{
      if (err){
        var log = data
        if(from && !to){
          log = log.filter(obj=> new Date(> new Date(from).getTime());
        } else if (!from && to){
          log = log.filter(obj=> new Date(< new Date(to).getTime());
        } else if (from && to){
          log = log.filter(obj=> new Date(> new Date(from).getTime() && new Date(< new Date(to).getTime());

        if (limit){
          log = log.slice(0, parseInt(limit));
        const count = log.length
        res.json({username: data[0].username, 'username': data[0].username, 'count': count, 'log': log})
  } catch(err){
const listener = app.listen(process.env.PORT || 3000, () => {
  console.log('Your app is listening on port ' + listener.address().port)

It’s would be nice to show a response example, like the one attached. So we know what should we put in the log, and what else should we send back as response. That’s all it takes to fix my problem anyway.

Well done, on passing.

In the hints page, there should be an example output with a few hints. Perhaps we could improve this for now.

Anyway, keep it up.