Skip to content

Commit

Permalink
Add jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewmeyer committed Mar 2, 2018
1 parent c580cda commit 2ff9d74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/builders/launch-query.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Required to correctly output ObjectID's
const ObjectId = require('mongodb').ObjectID;


/**
* Builds Mongo query for past/upcoming launch endpoints from querystrings
* @param {Object} req The Express request object to access querystrings
Expand Down
12 changes: 8 additions & 4 deletions src/builders/launch-sort.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/**
* Returns sorting query for past/upcoming launches
*/

// Prevent incorrect input
const lowerCase = require('lower-case');

exports.launchSort = (req) => {
/**
* Builds Mongo sort object to set document order
* @param {Object} req The Express request object to access querystrings
* @return {Object} Mongo compatible sort object
*/

module.exports.launchSort = (req) => {
const query = {};

if (lowerCase(req.query.order) === 'asc') {
Expand Down

0 comments on commit 2ff9d74

Please sign in to comment.