Skip to content
New issue

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

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

Already on GitHub? # to your account

Refactor services to use async instead of callbacks #264

Open
ElJocko opened this issue Jun 20, 2023 · 0 comments
Open

Refactor services to use async instead of callbacks #264

ElJocko opened this issue Jun 20, 2023 · 0 comments

Comments

@ElJocko
Copy link
Contributor

ElJocko commented Jun 20, 2023

Mongoose 7.x.x removes support for callbacks, so all calls to Mongoose models and documents need to be refactored to use async instead of callbacks before the REST API can upgrade to use the latest version. Mongoose 6.x.x is currently being maintained, but will only receive security updates after August 2023.

It may be advantageous to combine this refactoring with a change to the services to use a set of generic functions that eliminate most of the redundant code across the services.

Most calls to the Mongoose functions are located in the object services, but changing the service functions to async will require changing the controller functions that call the services (or adding shims, but we might as well bring everything up to the same level)

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

No branches or pull requests

1 participant