louischatriot / mongo-edit

A simple REST gui for MongoDB
228 stars 32 forks source link

fix not ObjectID _id #9

Closed pzeups closed 11 years ago

louischatriot commented 11 years ago

Thanks for that but I prefer to leave the page trigger an error instead. This url should not be called with a non objectId string anyway so I don't want to display an edit form if its the case.

The best would be to catch the error so that node doesnt crash and display the error message as it already happens.

louischatriot commented 11 years ago

I did it like this: https://github.com/tldrio/mongo-edit/commit/2e61e4d3c012ea3d00dcf10a6ecc6f3d703199ba

lightjs commented 11 years ago

Agreed, needs to fix another file anyway. (for the save function)

But what happens for the other kinds of Mongo ID? (I think to custom shard key for example)

louischatriot commented 11 years ago

Non standard mongo ids and custom shard keys are currently not supported (maybe they are but then it would be a coincidence !). My take is that if you need those, its possible you've outgrown the need for Mongo Edit. But if it's easily supportable that would be a great addition to Mongo Edit.