-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: enroll and unenroll process with new and old endpoints #44
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@MaferMazu @andres-arango-aptitude can you check this, please? |
julianramirez2
force-pushed
the
new-api-process
branch
from
October 10, 2023 20:57
2d2fb1b
to
ec40747
Compare
julianramirez2
force-pushed
the
new-api-process
branch
from
October 10, 2023 21:44
b892bec
to
ec40747
Compare
MaferMazu
approved these changes
Oct 12, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks :D
Merged
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A dynamic approach is implemented between the new endpoints for enrollments and unenrollments and the 'legacy' endpoints that have been functioning currently. The goal is to foster versatility across platforms, allowing both new and existing systems to seamlessly utilize these changes. This transition ensures a progressive and secure adoption of the new implementations across various platforms.
To achieve this, an attempt is made to execute processes using the new endpoints. In case of failure, a fallback to the 'legacy' endpoints is initiated. If the response is positive in the first attempt, the response is returned directly.
Additionally, a minor issue has been addressed where error messages from the API were not displayed as-is but were briefly processed, resulting in limited visibility of the actual error feedback.
Testing instructions
Go to the stage and create or update enrollments, you can also try the enrollment allowed process. The new features have already been uploaded to the stage.
Additional information
The default answer for an unenrollment with enrollment__allowed is "[]". A custom message for it was implemented to give enough feedback to the user to know if the process response was good. The message is "User unenrolled successfully".