📅  最后修改于: 2022-03-11 15:03:04.999000             🧑  作者: Mango
Re-arranging by putting the route the has an id or _id (doesn't really matter) parameter fixed the
issue for me. For example;
BEFORE;
app.use("/api/:id", postDetail);
app.use("/api/posts", posts);
app.use('/api/orders/', orders);
AFTER;
app.use("/api/posts", posts);
app.use("/api/orders/", orders);
app.use("/api/:id", postDetail);