This update reworks on StorageService.js. As of before, StorageService.js made a lot of unnecessary and resourceful HTTP requests to the server, even if the client lost internet connectivity and was offline. By utilizing NetworkStatusService.js, the StorageService.js can now retrieve the network status and skip HTTP requests if implemented correctly in a function.
Changes
Made StorageService.js observe NetworkStatusService.js and get notified when network status changes.
Added JSDoc for each function in StorageService.js.
Moved a base64 string out of the source code into a separate .json file.
Updated relevant unit tests.
Dependency added: None
Related Issues
None.
Checklist
[x] Code has been tested locally and passes all relevant tests.
[x] Documentation has been updated to reflect the changes, if applicable.
[x] Code follows the established coding style and guidelines of the project.
[x] All new and existing tests related to the changes have passed.
[x] Any necessary dependencies or new packages have been properly documented.
[x] Pull request title and description are clear and descriptive.
[x] Reviewers have been assigned to the pull request.
[x] Any potential security implications have been considered and addressed.
[x] Performance impact of the changes has been evaluated, if relevant.
Screenshots (if applicable)
If mobile/frontend pull request, what version of the backend is it stable, and running on?
Description
This update reworks on
StorageService.js
. As of before,StorageService.js
made a lot of unnecessary and resourceful HTTP requests to the server, even if the client lost internet connectivity and was offline. By utilizingNetworkStatusService.js
, theStorageService.js
can now retrieve the network status and skip HTTP requests if implemented correctly in a function.Changes
StorageService.js
observeNetworkStatusService.js
and get notified when network status changes.StorageService.js
..json
file.Related Issues
None.
Checklist
Screenshots (if applicable)
If mobile/frontend pull request, what version of the backend is it stable, and running on?
Branch:
dev
(8cb56a5)Notes for Reviewers