The current RFID check only says if the given key is available or not. We need a call that can tell if an individual scanner should allow the given user. For instance, if the fob holder is allowed in the office, or turn on the laser cutter, etc.
The route is:
/v1/rfid/location/:rfid/:location
Tasks:
Add a description to the openapi doc
Add the route to the router
Add a new table for locations
Add a new table that relates locations to the RFID tag that is allowed to use the location
Add a method to the DB interface to check if the RFID tag is allowed to use the location
Implement that method in both PG and Mock databases
Implement the route
Unit tests for the route (with Mock database) and directly against the PG database
The current RFID check only says if the given key is available or not. We need a call that can tell if an individual scanner should allow the given user. For instance, if the fob holder is allowed in the office, or turn on the laser cutter, etc.
The route is:
/v1/rfid/location/:rfid/:location
Tasks: