-
-
Notifications
You must be signed in to change notification settings - Fork 178
Remove unnecessary log exclusions and refactor controller. #1267
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: development
Are you sure you want to change the base?
Conversation
|
@Ferks-FK can you post an update here on github? |
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 refactors the user registration process by extracting referral logic into a dedicated ProcessReferralAction class and modernizing the RegisterController. The refactoring improves code organization by separating concerns and changes the order of operations to create the Pterodactyl account before the local user record, reducing the need for cleanup on failure.
Key changes:
- Extracted referral processing logic from
RegisterControllerinto a newProcessReferralActionclass - Modernized property declarations with typed properties and camelCase naming conventions
- Reordered user creation to occur after successful Pterodactyl API call, eliminating the need for user deletion on API failure
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| app/Http/Controllers/Auth/RegisterController.php | Refactored to use typed properties with camelCase naming, changed constructor to use app() helper instead of dependency injection, reordered user creation logic, and delegated referral processing to the new action class |
| app/Actions/ProcessReferralAction.php | New action class that encapsulates referral processing logic including credit rewards, notifications, and database logging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR fixes: #1264.
Note: The Referral notification class is in a new syntax, which was introduced by PR: #1257.
To work, the two PRs must be merged together.