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

Feature/promise server logic #267

Merged
merged 5 commits into from
Jan 11, 2022
Merged

Feature/promise server logic #267

merged 5 commits into from
Jan 11, 2022

Conversation

crokita
Copy link
Contributor

@crokita crokita commented Dec 13, 2021

Fixes #261

This PR is ready for review.

Risk

This PR makes no API changes.

Summary

This is an overhaul on the logic of the backend of the policy server. Older methods and libraries of handling asynchronous logic have been replaced with Promises and the async/await syntax. This is intended not to affect any functionality with the front-end or with the existing routes, so it should be fully compatible with how it currently functions.

Copy link
Contributor

@renonick87 renonick87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See feedback.

app/v1/groups/model.js Outdated Show resolved Hide resolved
custom/databases/postgres/index.js Outdated Show resolved Hide resolved
app/v1/applications/model.js Outdated Show resolved Hide resolved
app/v1/applications/helper.js Show resolved Hide resolved
@crokita
Copy link
Contributor Author

crokita commented Jan 7, 2022

Feedback applied. Additionally, the getAppCertificateByUuid function returned an array of data instead of a single element, which differed from the original version. The database function asyncTransaction now re-throws any caught errors so that the server logic also knows whether the transaction fails.

@crokita crokita merged commit 9b467df into develop Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SDL 0344] Use Promises in Server Logic of SDL Policy Server
2 participants