-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(router_core): move hardcoded value to constant for max invitations (fix #5938) #6151
Conversation
Review changes with SemanticDiff. |
crates/router/src/core/user.rs
Outdated
@@ -498,7 +498,7 @@ pub async fn invite_multiple_user( | |||
req_state: ReqState, | |||
auth_id: Option<String>, | |||
) -> UserResponse<Vec<InviteMultipleUserResponse>> { | |||
if requests.len() > 10 { | |||
if requests.len() > consts::user::MAX_INVITE_REQUESTS { | |||
return Err(report!(UserErrors::MaxInvitationsError)) | |||
.attach_printable("Number of invite requests must not exceed 10"); |
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.
Change this attach_printable
as well.
Log the const value and also try to log the number of requests as well in this.
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.
Changes are done and committed the code.
@ThisIsMani, Changes are done and committed the code. |
@ramkumargs, were you able to test this? |
Let me know if you need instructions on this. |
@ThisIsMani please give me the steps for testing. |
Hey @ramkumargs, sorry for the late reply. Steps for testing:
Let me know if you face any issues. If you were able to check, please attach a screenshot in the description. |
@ThisIsMani , I will test and update you today |
Hey @ramkumargs Any update here? |
b87152a
to
4ef48c3
Compare
Hi @gorakhnathy7 sorry for late reply. I was struck on my some personal issue. |
Hey @ramkumargs, did the |
Can you use |
Type of Change
Description
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy