Exercise Tracker not passing last test-please help

Hi

Im having issues having my exercise tracking proyect passing the last test, Im able to pass all of them except: I can retrieve part of the log of any user by also passing along optional parameters of from & to or limit. (Date format yyyy-mm-dd, limit = int).

I have an app.get request that uses array.prototype.filter method to filter user logs using date comparisons and limit results depending on req.query param added to the route. Its working fine on glitch.com but its passing the test , already formatted dates using toDateString() method , and checked that count property outputs an integer in the response. Is there something else that I could be missing?

Any help would be appreciated

here is my glitch project :https://glitch.com/~excersise-tracker333

app.get("/api/exercise/log", function(req,res){
  async function getUser(){
    let user=await exerciseModel.find({id:req.query.userId})
  try{
    return user
  }
  catch(err){
    console.log(err)
        }
     }
  getUser().then(function(results){
    console.log(results)
    if (req.query.from){
      if(req.query.from && req.query.to){
      let fltr= results[0].log.filter(element=>{
        return new Date(element.date.toString())>new Date(req.query.from.toString()) 
        && new Date(element.date.toString())<new Date(req.query.to.toString())
      })
      if(parseInt(req.query.limit)){
        fltr=fltr.slice(0,req.query.limit)
      }
      
      res.json({"_id":req.query.userId,"username":results[0].username,"from":new Date(req.query.from.toString()).toDateString(),
                "to":new Date(req.query.to.toString()).toDateString(),"count":fltr.length, "log":fltr})
    }
      let fltr= results[0].log.filter(element=>{
        return new Date(element.date.toString())>new Date(req.query.from.toString()) 
      })
      if(parseInt(req.query.limit)){
        fltr=fltr.slice(0,req.query.limit)
      }
      
       res.json({"_id":req.query.userId,"username":results[0].username,"from":new Date(req.query.from.toString()).toDateString(),
                "count":fltr.length, "log":fltr})
     
    }
    else if(req.query.to){
      let fltr= results[0].log.filter(element=>{
        return new Date(element.date.toString())<new Date(req.query.to.toString())})
      if(parseInt(req.query.limit)){
        fltr=fltr.slice(0,req.query.limit)
      }
      
      res.json({"_id":req.query.userId,"username":results[0].username,"to":new Date(req.query.to.toString()).toDateString(),
                "count":fltr.length,"log":fltr})
      
      }
    else{
      
      res.json({_id:results[0].id, username:results[0].username, count:results[0].count,log:results[0].log})
    }
    
    
  })
})