Closed Nickwang3 closed 4 years ago
Since all of our react components use this class to request data from our backend, a singleton approach was natural. Added a static getInstance call to retrieve the single instance. ApiService instance stores total number of requests that a user has made across the website. Now limits the user to 10000 requests per session. Took about 1.5 hrs to complete.
Add state to the api service to keep track of requests and other meta data. This class is shared by many components so we ideally only want one of these objects.