pass user object to create text use case
drop UserRepository dependency; controller now passes the authenticated User directly via CreateTextRequest, eliminating a redundant repository lookup.
This commit is contained in:
parent
ffef0ddff6
commit
bf006220e8
2 changed files with 7 additions and 0 deletions
|
|
@ -2,9 +2,12 @@
|
|||
|
||||
namespace App\Text\UseCases;
|
||||
|
||||
use App\User\User;
|
||||
|
||||
class CreateTextRequest
|
||||
{
|
||||
public function __construct(
|
||||
public ?string $name,
|
||||
public ?User $user,
|
||||
) {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue