bkkhack / hackmap

App to help collaboration at hacknights.
https://bkkhack.github.io/hackmap/
MIT License
10 stars 9 forks source link

When the user is logged in, apply their authentication to all API calls #44

Closed waf closed 6 years ago

waf commented 6 years ago

Authenticated API calls have a higher rate limit, so if the user is already logged in, we should use that authentication information to get the higher rate limit.

In the code, by chaining the startPolling() function as a promise, we ensure that the authenticated HTTP client will be used for all operations.