BloomTech-Labs / labs9-cleaner-pos

8 stars 5 forks source link

Refactor token & stays route to save a db query #72

Open NandoTheessen opened 5 years ago

NandoTheessen commented 5 years ago

Issue Type

Our stays.ts route fires three db queries per get request, as you can see in the findAllStays function.

Solution:

Include the user.id in the JWT token body to spare one db request to find the user by ext_it

NandoTheessen commented 5 years ago

Optimize Stays Route

NandoTheessen commented 5 years ago

Guests