rcos / observatory-server

A project tracking dashboard for Rensselaer Center for Open Source
https://rcos.io
MIT License
14 stars 51 forks source link

classYear.getCurrent() and classYear.getCurrentCode() refactored and reintegrated across codebase #800

Closed TungE closed 6 years ago

TungE commented 6 years ago

This pull request addresses issue #796.

I refactored classYear.getCurrent() and classYear.getCurrentCode() to now return a "then-able" object.

The associated calls across the code base (~23 uses of getCurrent and ~1 use of getCurrentCode) to work with async/await.

For the most part, I didn't change any code that I didn't have to, although this process did require me to refactor some existing code to use async/await (because await cannot exist in a callback).

All tests from "npm test" passed.

aeksco commented 6 years ago

Great work!