File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 22// Required to correctly output ObjectID's
33const ObjectId = require ( 'mongodb' ) . ObjectID ;
44
5-
65/**
76 * Builds Mongo query for past/upcoming launch endpoints from querystrings
87 * @param {Object } req The Express request object to access querystrings
Original file line number Diff line number Diff line change 1- /**
2- * Returns sorting query for past/upcoming launches
3- */
41
2+ // Prevent incorrect input
53const lowerCase = require ( 'lower-case' ) ;
64
7- exports . launchSort = ( req ) => {
5+ /**
6+ * Builds Mongo sort object to set document order
7+ * @param {Object } req The Express request object to access querystrings
8+ * @return {Object } Mongo compatible sort object
9+ */
10+
11+ module . exports . launchSort = ( req ) => {
812 const query = { } ;
913
1014 if ( lowerCase ( req . query . order ) === 'asc' ) {
You can’t perform that action at this time.
0 commit comments