bj-rutledge / CRUD-API-Example

Simple Example of a CRUD API
MIT License
1 stars 3 forks source link

need route helper to validate incomming queries #83

Closed bj-rutledge closed 2 weeks ago

bj-rutledge commented 2 weeks ago

Currently we are not using DRY code methodology when validating incoming queries in our routes:

   if (
      query.email == undefined &&
      query.phoneNumber == undefined &&
      query.customerNumber == undefined
   )

Write a helper that does this for each of the routes called validateQuery Account for thtat some of the queries come in as a query object some as a json object.