Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back-end: Separate the functionality of the sockets server from the sockets server file #350

Closed
OrAbramovich opened this issue Apr 30, 2018 · 3 comments
Assignees
Labels

Comments

@OrAbramovich
Copy link
Collaborator

The change have to be done so the REST server can use the functions defined in the file as well. Furthermore, it makes the module more testable.

@OrAbramovich OrAbramovich added this to the Mid Semester POC milestone Apr 30, 2018
@OrAbramovich OrAbramovich self-assigned this Apr 30, 2018
@OrAbramovich
Copy link
Collaborator Author

Time estimation: 0.5 hour.

OrAbramovich added a commit that referenced this issue May 1, 2018
…sockets server file

Back-end: Implemented: Sockets-server: Has to provide functionality and not an enum
Back-end: Added changing notification read state functionality to the notification module

The commit contains a new module - socketsServerHandlers.js which includes the functionalities provided by the socket server so the socket server listen to messages and triggers the relevant function in the socketsServerHandlers. The separation was done for 2 purposes: the rest server can now use the function as well (avoiding code duplication) and for testing purposes (unit tests).
In addition, in order to improve the abstraction, the sockets server doesn't expose the types enum but provide functions to the clients.
Furthermore, the notification module is now responsible for changing the read state of a notification instead of manual editing the property in the client side.

#350, #357,  #359
@OrAbramovich
Copy link
Collaborator Author

Actual time: 0.5 hour.

@OrAbramovich
Copy link
Collaborator Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant