PW
а то я наоборот всю логику пересуунул в контроллер
а модели (репозитории) у меня просто с бд уже работают без каких-либо проверок
Size: a a a
PW
PS
PW
PW
PS
PW
PS
PW
ВЯ
PW
PW
ВЯ
(node:9656) UnhandledPromiseRejectionWarning: CastError: Cast to ObjectId failed for value "" at path "_id" for model "Course"
at model.Query.exec (C:\Users\Code\Desktop\NODE_PRAX\NODEJS-BASICS\node_modules\mongoose\lib\query.js:4358:21)
at model.Query.Query.then (C:\Users\Code\Desktop\NODE_PRAX\NODEJS-BASICS\node_modules\mongoose\lib\query.js:4450:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:9656) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 13)
ВЯ
С
AJ
AJ
VB
VJ