Skip to content

Automatically assign door codes to new members via external service#2105

Open
adarshm11 wants to merge 3 commits intodevfrom
feature/door-code-distribution
Open

Automatically assign door codes to new members via external service#2105
adarshm11 wants to merge 3 commits intodevfrom
feature/door-code-distribution

Conversation

@adarshm11
Copy link
Copy Markdown
Contributor

Problem

When a user pays for membership, their membership status is updated automatically, but their door code has to be manually assigned. This is a problem because most members pay almost exclusively for the door code so this should be automated.

Context

I created DCD, a simple microservice to maintain and distribute door codes given to SCE by the department. This engine makes sure that the door codes are distributed evenly; since there are more members than door codes, there are inevitably repeats, but the codes are repeated at an almost identical frequency.

Implementation

I modified the workflow for membership validation by having Clark query DCD for a new door code, then assigning that door code to the user when updating their membership status. This includes robust error handling for tracking when issues occur with querying DCD, and also made it so that the API call to DCD can be mocked, in case of a local setup where the developer does not have access to the production DCD server.

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.

1 participant