feat: GET/POST inventory
Summary
Okay there is too much in this one ^^ Let's untangle all of that a bit
Changes
Routes
there is two new routes
-
GET /inventory
: list all inventory - 'POST /inventory`: create a new entry in the inventory
Router
The router has been refactored to be more modular as well as handling dependencies of controllers
Repo
That PR adds pg as postgres Client and two simple SQL operation against the inventory INSERT and SELECT
This implied more config and of course drilling down dependencies from index.ts to the server to the controllers
What should have been in the box
What is missing is four main things:
- tests
- an error refinement to make the API more verbose and stick to good practices
- a root to PATCH an inventory
- a root to bulk update