mongo-express-docker icon indicating copy to clipboard operation
mongo-express-docker copied to clipboard

"Delete all" broken in latest release

Open camalot opened this issue 1 year ago • 6 comments

If you attempt to "Delete All" from a collection the server crashes and logs the following error

2023-10-10T00:35:46.021960762Z /node_modules/mongo-express/lib/routes/collection.js:84
2023-10-10T00:35:46.021983745Z           ...result,
2023-10-10T00:35:46.021988073Z              ^
2023-10-10T00:35:46.021991550Z 
2023-10-10T00:35:46.021995016Z TypeError: result is not iterable
2023-10-10T00:35:46.021998673Z     at exp._buildMongoQuery (/node_modules/mongo-express/lib/routes/collection.js:84:14)
2023-10-10T00:35:46.022002541Z     at exp.deleteCollection (/node_modules/mongo-express/lib/routes/collection.js:448:23)
2023-10-10T00:35:46.022006077Z     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
2023-10-10T00:35:46.022009594Z     at next (/node_modules/express/lib/router/route.js:144:13)
2023-10-10T00:35:46.022013050Z     at mongoMiddleware (/node_modules/mongo-express/lib/router.js:260:5)
2023-10-10T00:35:46.022016557Z     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
2023-10-10T00:35:46.022020053Z     at next (/node_modules/express/lib/router/route.js:144:13)
2023-10-10T00:35:46.022023600Z     at Route.dispatch (/node_modules/express/lib/router/route.js:114:3)
2023-10-10T00:35:46.022027187Z     at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
2023-10-10T00:35:46.022030693Z     at /node_modules/express/lib/router/index.js:284:15
2023-10-10T00:35:46.022034130Z

camalot avatar Oct 10 '23 00:10 camalot