3 ms·
Awesome tutorial. It's always fun to mess around with things like this. I am running into a problem with sorting though. On lesson 6 I am sorting with {weight:1
by tomkr 16y ago
Awesome tutorial. It's always fun to mess around with things like this.
I am running into a problem with sorting though. On lesson 6 I am sorting with {weight:1} which the tutorial says is wrong, but I get the same answer as sorting on {weight: -1} which is correct according to the tutorial. Or is this a mongodb thing?
Anyway, keep up the good work.
- latch 16y agoweight:-1 is correct..since you want the heaviest, you sort by weight descending. weight:1 should have returned documents in ascending order but wasn't working. It's fixed now on the tutorial..as well as in the core web console: https://github.com/karlseguin/Mongo-Web-Admin/commit/761cd4e60682eb4fc8c941fc74d29696159a1bce https://github.com/karlseguin/Mongo-Web-Admin/commit/761cd4e...