0

Answer:

it says you didn’t set user in order model here:

https://github.com/basir/mern-amazona/blob/master/backend/routes/orderRoutes.js#L32

use

console.log(req.user)

to see what you pass to db and fix the issue there.

Basir Asked question September 16, 2022