Open danvanhorn opened 5 years ago
Some work on this is already on the feat/client-table
. The client_id has been included in the auth token already. Middleware to turn this into an employee has yet to be done though. Though since we already have a secure client_id I'm not sure we need the employee object on every request. We could just get it when needed now.
This is important, as it will determine now much we need to change the front end to associate the new
client_id
feature. We should have the means to associate an employee with their correspondingclient_id
in the back end. My and Brennan's first inclination is middleware that creates an employee object and passes it along with each request. We could extend the Express.Request object in typescript in order to make this cleaner. We should figure out the best and most secure way to do this because it will effect how much we change the front-end app.