routes/index.js
/**
 * Reads the request body and pulls the list of users
 * Request body can be an array of strings, or an object
 * with a "users" key
 * 
 * Returns the array of strings.
 * 
 * @param {Object} req 
 * @returns 
 */
Reads the request body and pulls the list of users
Request body can be an array of strings, or an object
with a "users" key

Returns the array of strings.

@param {Object} req
@returns
Reads the request body and pulls the list of users Request body can be an array of strings or an object with a " users " key Returns the array of strings . @param { Object } req @returns
function parseUserRequest(req) {
  let usersKey = "users"
  let queryUsers = req.body
  if (Object.keys(queryUsers).includes(usersKey)) queryUsers = queryUsers[usersKey]
  return queryUsers
}
function parseUserRequest ( req ) { let usersKey = "users" let queryUsers = req . body if ( Object . keys ( queryUsers ) . includes ( usersKey ) ) queryUsers = queryUsers [ usersKey ] return queryUsers }
Reads the request body and pulls the list of users
 Request body can be an array of strings, or an object
 with a "users" key
Reads the request body and pulls the list of users Request body can be an array of strings or an object with a " users " key
// Request Body accepts arrays of strings