fix bug - without affilate code wont be able to register

This commit is contained in:
Edmond Lang
2025-12-10 00:20:51 +08:00
parent 0ec69239bd
commit 2a4abdd07b
@@ -17,7 +17,7 @@ class TracksAffiliateRegistration
* @param User $user
* @return Affiliate|null
*/
public function execute(User $user, string $code): ?Affiliate
public function execute(User $user, ?string $code = null): ?Affiliate
{
if (!$code || !$this->isValidCode($code)) {
Log::info('Code is not valid', ['code' => $code]);