A scalable backend server solution designed to manage and orchestrate software development bootcamps/courses from multiple schools, providing robust APIs and data storage capabilities.
2
stars
0
forks
source link
[BUG] : Parameter "filter" to findOneAndUpdate() must be an object #56
/Users/bally/workspace/tccp-server/node_modules/mongoose/lib/query.js:3199
[run] new ObjectParameterError(filter, 'filter', 'findOneAndUpdate')
[run] ^
[run]
[run] ObjectParameterError: Parameter "filter" to findOneAndUpdate() must be an object, got "66228f3d8d49c2652efe12cf" (type string)
[run] at Query.findOneAndUpdate (/Users/bally/workspace/tccp-server/node_modules/mongoose/lib/query.js:3199:7)
[run] at Model.findOneAndUpdate (/Users/bally/workspace/tccp-server/node_modules/mongoose/lib/model.js:2538:13)
[run] at updateBootcamp (file:///Users/bally/workspace/tccp-server/dist/controller/bootcamp.js:87:35)
[run] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[run]
To Reproduce
Steps to reproduce the behavior:
Go to 'bootcamp'
Update a bootcamp
See error in the console
Expected behavior
A response with the updated entity should be sent
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
Add any other context about the problem here.
Describe the bug
/Users/bally/workspace/tccp-server/node_modules/mongoose/lib/query.js:3199 [run] new ObjectParameterError(filter, 'filter', 'findOneAndUpdate') [run] ^ [run] [run] ObjectParameterError: Parameter "filter" to findOneAndUpdate() must be an object, got "66228f3d8d49c2652efe12cf" (type string) [run] at Query.findOneAndUpdate (/Users/bally/workspace/tccp-server/node_modules/mongoose/lib/query.js:3199:7) [run] at Model.findOneAndUpdate (/Users/bally/workspace/tccp-server/node_modules/mongoose/lib/model.js:2538:13) [run] at updateBootcamp (file:///Users/bally/workspace/tccp-server/dist/controller/bootcamp.js:87:35) [run] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [run]
To Reproduce Steps to reproduce the behavior:
Expected behavior A response with the updated entity should be sent
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.