FrancisG-Massey / Capstone2016

4 stars 0 forks source link

Refactor the request handler to forward logged user details #193

Closed sam-hunt closed 8 years ago

sam-hunt commented 8 years ago

Currently the user id is looked up by the session check at the start of a request, but this is not saved anywhere.

If we can save the looked-up id in the dataset map, then it can be forwarded through the main request and post-request SQL calls can use these without having to join through the session header and user table multiple times.

This will reduce the complexity of all queries and speed up execution, especially aiding with issues #80, #161, and #192.

sam-hunt commented 8 years ago

The following variables are now made available to dataset main and after queries:

bigint:logged-user-id

boolean:logged-user-isadmin

timestamp:session-expires

The next step is to make these names dynamic pull from the resultset column names. But that is an issue for another day.