I'm practicing writing back-end code to handle the routing for an API endpoint using Node, Express, PostgreSQL, and Knex. This is the ERD (Entity Relationship Diagram) of the Call Center Database.
https://i.imgur.com/4xkosHp.png
The API endpoints here is for /tickets in the following two links:
tickets.controller.js: https://pastebin.com/Zh31H7uW
tickets.router.js: https://pastebin.com/tauBein4
I'm trying to meet this criteria:
employees.controller.js: https://pastebin.com/jpkaX0VJ
employees.router.js: https://pastebin.com/nyHMvthy
Did I organize the code in tickets.controller.js and tickets.router.js to meet the above criteria for the API endpoints and follow best practices? Open to any and all feedback for this. Thank you!