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

[REFACTOR] Move Hardcoded Value to Constant for Max Invitations #5938

Open
2 tasks done
ThisIsMani opened this issue Sep 18, 2024 · 0 comments
Open
2 tasks done

[REFACTOR] Move Hardcoded Value to Constant for Max Invitations #5938

ThisIsMani opened this issue Sep 18, 2024 · 0 comments
Labels
A-users Area: Users C-refactor Category: Refactor good first issue Good for newcomers hacktoberfest Issues that are up for grabs for Hacktoberfest participants

Comments

@ThisIsMani
Copy link
Contributor

Feature Description

Here:

if requests.len() > 10 {

In the current implementation, the value 10 is hardcoded when checking the number of invite requests in the code. To improve maintainability and avoid magic numbers, this value should be moved to a constant in crates/router/src/consts/user.rs.

Possible Implementation

  • Create a new constant in crates/router/src/consts/user.rs to represent the maximum number of allowed invite requests.
  • Refactor the code to replace the hardcoded value 10 with this new constant.

Have you spent some time checking if this feature request has been raised before?

  • I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

No, but I'm happy to collaborate on a PR with someone else

@ThisIsMani ThisIsMani added S-awaiting-triage Status: New issues that have not been assessed yet C-refactor Category: Refactor good first issue Good for newcomers A-users Area: Users hacktoberfest Issues that are up for grabs for Hacktoberfest participants and removed S-awaiting-triage Status: New issues that have not been assessed yet labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-refactor Category: Refactor good first issue Good for newcomers hacktoberfest Issues that are up for grabs for Hacktoberfest participants
Projects
None yet
Development

No branches or pull requests

1 participant