Back End Development and APIs Projects - Exercise Tracker "You can make a GET request to /api/users/:_id/logs to retrieve a full exercise log of any user."

Tell us what’s happening:
I’m having an issue with the " You can make a GET request to '/api/users/:_id/logs' to retrieve a full exercise log of any user." part in Exercise Tracker, I haven’t done the other part but I want to resolve this problem first.

I’m using an array in this project.

When I try to request with the GET method, I find the project functions as it should, but freeCodeCamp validation doesn’t say so, I try to search and inspect every data and think there’s nothing wrong with the JSON I sent with the server.

can anyone please explain why this is happening?

const express = require('express')
const app = express()
const cors = require('cors')
require('dotenv').config()

const users = []
const exercises = []

app.use(cors())
app.use(express.urlencoded({extended: true}))
app.use(express.json())
app.use(express.static('public'))
app.get('/', (req, res) => {
  res.sendFile(__dirname + '/views/index.html')
});

app.get('/api/users', (req, res) => {
  res.json(users);
}) 

app.post('/api/users', (req, res) => {
  const {username} = req.body;

  const newUser = {
    _id: `${users.length}`,
    username,
  }

  users.push(newUser)
  exercises.push([])
  res.json(newUser)
})

app.post('/api/users/:id/exercises', (req, res) => {
  let { description, duration, date } = req.body
  const _id = req.params.id
  const user = users.find((user) => user._id === _id)
  date = new Date(date).toDateString()
  if (!user) {
    return res.status(400).json({ error: 'User not found' });
  }
  if (date == 'Invalid Date') {
    return res.status(400).json({ error: 'Invalid Date' })
  }

  const exercise = {description, duration: Number(duration), date}
  exercises[_id].unshift(exercise)

  res.json({
    ...user,
    ...exercise,
  })
})

app.get('/api/users/:_id/logs', (req, res) => {
  const id = Number(req.params._id)
  const user = users[id]
  let logs = exercises[id]

  res.json({
    ...user,
    count: logs.length,
    log: logs,
  })
})

const listener = app.listen(process.env.PORT || 3000, () => {
  console.log('Your app is listening on port ' + listener.address().port)
})

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

Challenge: Back End Development and APIs Projects - Exercise Tracker

Link to the challenge: