From 9b2539e3782625c5b03ae99301c41efd9aadd243 Mon Sep 17 00:00:00 2001 From: TekH Date: Sat, 30 May 2026 16:47:51 +0200 Subject: [PATCH] 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. --- .../Envelopes/Commands/CreateEnvelopeCommand.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeCommand.cs b/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeCommand.cs index 2c1367cb..52bcfeb3 100644 --- a/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeCommand.cs +++ b/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeCommand.cs @@ -40,10 +40,10 @@ public record CreateEnvelopeCommand : IRequest /// /// /// - public bool Authorize(int userId) + public CreateEnvelopeCommand WithAuth(int userId) { UserId = userId; - return true; + return this; } ///