I started a new project in node.js. am added a path(n point) localhost:5000/api/chats
A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.
const { chats } = require("./data/data");
const app = express();
app.get("/", (req, res) => {
res.send("Api is running");
});
app.get("/api/chat", (req, res) => {
console.log(res);
res.send(chats);
});
**This is code**
app.get('/api/chat/:id', (req, res) => {
console.log(req)
})
app.listen(5001, console.log("Server started on PORT 5001"));
To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData.