десткруктуризацией объекта:
                  
                  
                    const {
                  
                  
                      body: { enroll: toEnroll },
                  
                  
                      query: { courseId },
                  
                  
                    } = req;
                  
                  
                    console.log(req.body);
                  
                  
                    console.log('toEnroll:', toEnroll);
                  
                  
                  
                  
                  
                  но у меня выходит:
                  
                  
                  {
                  
                  
                    "enroll": true,
                  
                  
                  }
                  
                  
                  toEnroll: undefined
                  
                  
                  
                  
                  
                  кто нидь может помочь?
                  
                  
                
Ещё бы посмотреть, что в req приходит
Обсуждают сегодня