Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
Practice with API Endpoints

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:

  • get info about the ticket based on id
  • create a ticket
  • get info about a ticket, including the employee associated with the ticket. There is also a controller and router file associated with this through employees which can be referenced, but it does not need to be organized.

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!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!