Sample code: http://pastebin.mozilla.org/2380312 As of now, returning the same data whether .field is 'asc' or 'desc'.
I'll check this out Tuesday morning
Created attachment 746440 [details] [review] https://github.com/mozilla/MakeAPI/pull/49 I've changed the "field" function to "sortByField" to make it clearer what it does. I've also added a way to test asc/desc sorting on the search page. Also, there was a bug in created at where it would always be the same date.
I've experienced a similar bug when I worked with Mongo & Express in the past (the date always being some 1974 date). Thanks for doing this! Changes look good to me; 'sortByField' makes a lot more sense.
Put that dep on the wrong bug.
No longer depends on: 866832
Comment on attachment 746440 [details] [review] https://github.com/mozilla/MakeAPI/pull/49 R+ from me. I guess just make sure people using the API know this changed. I changed it from sortByField originally to just field because I didn't like people being forced to key on "sortByField" when using make.find and passing it the object of filters.
Attachment #746440 - Flags: review?(schranz.m) → review+
Commit pushed to master at https://github.com/mozilla/MakeAPI https://github.com/mozilla/MakeAPI/commit/a5a5219fbf64e61f235b06cadcd0df3f2f363852 Bug 869197 - Change field to sortByField, add asc/desc selector to search page
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.