Refactor CreateEnvelopeCommand authorization method

Replaced the `Authorize` method with a new `WithAuth` method
in the `CreateEnvelopeCommand` class. The new method sets
the `UserId` property and returns the current instance,
enabling method chaining and improving usability.
This commit is contained in:
2026-05-30 16:47:51 +02:00
parent 0b73a90b15
commit 9b2539e378

View File

@@ -40,10 +40,10 @@ public record CreateEnvelopeCommand : IRequest<EnvelopeDto?>
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public bool Authorize(int userId)
public CreateEnvelopeCommand WithAuth(int userId)
{
UserId = userId;
return true;
return this;
}
/// <summary>