-
Notifications
You must be signed in to change notification settings - Fork 4
Extend invite expiration time to 7 days #22
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
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request contains two minor changes. One change removes a trailing newline from the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant InviteRoutes
participant InviteModel
Client->>InviteRoutes: Request to create invite
Note over InviteRoutes, InviteModel: Set expiry duration to 168 hours
InviteRoutes->>InviteModel: Generate invite code with updated expiry
InviteModel-->>InviteRoutes: Return new invite code
InviteRoutes-->>Client: Respond with invite details
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🪛 GitHub Actions: Rust CIsrc/models/invite_codes.rs[error] 161-161: Formatting check failed. Please run 'cargo fmt' to format the code. src/web/platform/invite_routes.rs[error] 344-344: Formatting check failed. Please run 'cargo fmt' to format the code. ⏰ Context from checks skipped due to timeout of 100000ms (1)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
PR Summary
This PR modifies the invite code expiration logic to extend the default duration from 24 hours to 7 days, while adding flexibility through an optional parameter.
- Missing validation for negative or unreasonably large expiry durations in
NewInviteCode::new()
- Should align validation with similar patterns in
PlatformEmailVerification
andPlatformPasswordReset
which enforce positive durations and reasonable limits - Consider adding unit tests to verify expiration time calculations
- Recommend adding documentation for the new optional parameter behavior
- Should update related error handling to include specific expiration validation errors
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
This PR extends the invite expiration time from 24 hours to 7 days (168 hours).
Changes:
create_invite
function from 24 hours to 168 hours (7 days)Fixes #19
Summary by CodeRabbit