R
Scope [AppModule -> AModule -> BModule -> CModule]
Круговая зависимость. Куда ставить forwardref?
Size: a a a
R
Scope [AppModule -> AModule -> BModule -> CModule]
М
М
И
АБ
try {
const patient = await Patient.findById(patientId).populate('appointments').exec()
res.json({
status: 'success',
data: {
...patient._doc,
appointments: patient.appointments,
},
})
} catch (e) {
return res.status(404).json({
success: false,
message: 'PATIENT_NOT_FOUND',
})
}
try {
const patient = await Patient.findById(patientId).populate('appointments').exec()
res.json({
status: 'success',
data: {
...patient._doc,
appointments: sortBy(patient.appointments, [
function (item) {
console.log(new Date(item.date + ' ' + item.time))
return new Date(item.date + ' ' + item.time)
},
]),
},
})
} catch (e) {
return res.status(404).json({
success: false,
message: 'PATIENT_NOT_FOUND',
})
}
М
И
try {
const patient = await Patient.findById(patientId).populate('appointments').exec()
res.json({
status: 'success',
data: {
...patient._doc,
appointments: patient.appointments,
},
})
} catch (e) {
return res.status(404).json({
success: false,
message: 'PATIENT_NOT_FOUND',
})
}
try {
const patient = await Patient.findById(patientId).populate('appointments').exec()
res.json({
status: 'success',
data: {
...patient._doc,
appointments: sortBy(patient.appointments, [
function (item) {
console.log(new Date(item.date + ' ' + item.time))
return new Date(item.date + ' ' + item.time)
},
]),
},
})
} catch (e) {
return res.status(404).json({
success: false,
message: 'PATIENT_NOT_FOUND',
})
}
MR
И
MK
И
꧁岡
И
꧁岡
r
М
АБ
try {
const patient = await Patient.findById(patientId).populate('appointments').exec()
res.json({
status: 'success',
data: {
...patient._doc,
appointments: patient.appointments,
},
})
} catch (e) {
return res.status(404).json({
success: false,
message: 'PATIENT_NOT_FOUND',
})
}
try {
const patient = await Patient.findById(patientId).populate('appointments').exec()
res.json({
status: 'success',
data: {
...patient._doc,
appointments: sortBy(patient.appointments, [
function (item) {
console.log(new Date(item.date + ' ' + item.time))
return new Date(item.date + ' ' + item.time)
},
]),
},
})
} catch (e) {
return res.status(404).json({
success: false,
message: 'PATIENT_NOT_FOUND',
})
}
И
꧁岡
CM