-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add new endpoint to resend #350
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
Conversation
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.
Pull Request Overview
This PR implements a new API endpoint to resend RSVP confirmation emails for a specific summit event. The implementation includes backend services, job processing, email templates, and frontend integration through a new PUT endpoint at api/v1/summits/{id}/events/{event_id}/rsvps/resend.
- Adds new RSVP resend functionality with email job processing and excerpt reports
- Implements API controller methods with proper validation and authorization
- Updates database schema with new email flow events and migration scripts
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| routes/api_v1.php | Adds the new PUT /rsvps/resend endpoint routing |
| database/seeders/ApiEndpointsSeeder.php | Seeds the new API endpoint with proper authorization groups |
| database/migrations/model/Version20250915143011.php | Migration to seed default email flow events for all summits |
| database/migrations/model/Version20250915143007.php | Migration to add RSVP confirmation excerpt email flow type |
| create_migration.sh | Updates entity manager reference for migrations |
| app/Swagger/schemas.php | Defines schema for the resend RSVP confirmation request |
| app/Services/Model/Imp/SummitRSVPService.php | Implements core resend logic and email processing |
| app/Services/Model/ISummitRSVPService.php | Adds interface methods for resend functionality |
| app/Models/Foundation/Summit/Events/RSVP/RSVP.php | Adds isActive method to RSVP model |
| app/Jobs/Emails/Schedule/RSVP/RSVPConfirmationExcerptEmail.php | Email job for confirmation excerpts |
| app/Jobs/Emails/Schedule/RSVP/ProcessRSVPConfirmationEmailsJob.php | Background job to process RSVP confirmation emails |
| app/Http/Controllers/Apis/Protected/Summit/OAuth2RSVPApiController.php | Controller implementation for the resend endpoint |
| tests/SummitRSVPInvitationServiceTest.php | Updates test to use correct filter name and adds event mocking |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
app/Http/Controllers/Apis/Protected/Summit/OAuth2RSVPApiController.php
Outdated
Show resolved
Hide resolved
app/Http/Controllers/Apis/Protected/Summit/OAuth2RSVPApiController.php
Outdated
Show resolved
Hide resolved
app/Http/Controllers/Apis/Protected/Summit/OAuth2RSVPApiController.php
Outdated
Show resolved
Hide resolved
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.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| ], | ||
| [ | ||
| 'name' => 'resend-rsvp-confirmation-by-event', |
Copilot
AI
Sep 15, 2025
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.
The PR title and description contains 'endppint' which is a typo. The endpoint name should be consistent with this correction - consider 'resend-rsvp-confirmation-by-event' vs the typo in the PR metadata.
| $rsvp = $this->tx_service->transaction(function () use ($flow_event, $invitation_id) { | ||
|
|
||
| Log::debug(sprintf("SummitRSVPService::resend processing rsvp id %s", $invitation_id)); | ||
|
|
||
| $rsvp = $this->rsvp_repository->getById(intval($invitation_id)); | ||
|
|
||
| if (!$rsvp instanceof RSVP) | ||
| return null; | ||
|
|
||
| if (!$rsvp->isActive()) { | ||
| Log::warning(sprintf("SummitRSVPService::resend rsvp %s is not active", $invitation_id)); | ||
| return null; | ||
| } | ||
| return $rsvp; | ||
| }); | ||
|
|
Copilot
AI
Sep 15, 2025
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.
Nested transaction within another transaction can cause performance issues and potential deadlocks. The inner transaction on line 519 is unnecessary since it's already within the outer transaction starting on line 509.
| $rsvp = $this->tx_service->transaction(function () use ($flow_event, $invitation_id) { | |
| Log::debug(sprintf("SummitRSVPService::resend processing rsvp id %s", $invitation_id)); | |
| $rsvp = $this->rsvp_repository->getById(intval($invitation_id)); | |
| if (!$rsvp instanceof RSVP) | |
| return null; | |
| if (!$rsvp->isActive()) { | |
| Log::warning(sprintf("SummitRSVPService::resend rsvp %s is not active", $invitation_id)); | |
| return null; | |
| } | |
| return $rsvp; | |
| }); | |
| Log::debug(sprintf("SummitRSVPService::resend processing rsvp id %s", $invitation_id)); | |
| $rsvp = $this->rsvp_repository->getById(intval($invitation_id)); | |
| if (!$rsvp instanceof RSVP) | |
| return; | |
| if (!$rsvp->isActive()) { | |
| Log::warning(sprintf("SummitRSVPService::resend rsvp %s is not active", $invitation_id)); | |
| return; | |
| } |
| if ($add_excerpt) { | ||
| $onDispatchSuccess( | ||
| $rsvp->getOwnerEmail(), IEmailExcerptService::EmailLineType, $flow_event | ||
| ); | ||
| } |
Copilot
AI
Sep 15, 2025
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.
The variable $add_excerpt is hardcoded to false on line 535 but is still used in this conditional. This code block will never execute, making the excerpt functionality non-functional.
30f4591 to
fe3c7cf
Compare
PUT api/v1/summits/{id}/events/{event_id}/rsvps/resend
…ller.php Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…ller.php Co-authored-by: Copilot <[email protected]>
…ller.php Co-authored-by: Copilot <[email protected]>
fe3c7cf to
da1c378
Compare
* feat: add new endppint to resend
PUT api/v1/summits/{id}/events/{event_id}/rsvps/resend
* Update app/Http/Controllers/Apis/Protected/Summit/OAuth2RSVPApiController.php
Co-authored-by: Copilot <[email protected]>
* Update database/seeders/ApiEndpointsSeeder.php
Co-authored-by: Copilot <[email protected]>
* Update app/Services/Model/Imp/SummitRSVPService.php
Co-authored-by: Copilot <[email protected]>
* Update app/Http/Controllers/Apis/Protected/Summit/OAuth2RSVPApiController.php
Co-authored-by: Copilot <[email protected]>
* Update app/Http/Controllers/Apis/Protected/Summit/OAuth2RSVPApiController.php
Co-authored-by: Copilot <[email protected]>
* chore: added missing flag
* chore: add debug info
* chore: fix missing email_flow_event
---------
Co-authored-by: Copilot <[email protected]>
feat: add new endppint to resend
PUT api/v1/summits/{id}/events/{event_id}/rsvps/resend
ref : https://tipit.avaza.com/project/view/386030#!tab=task-pane&groupby=ProjectSection&view=vertical&task=3866136&stafilter=NotComplete&fileview=grid