diff --git a/src/WorkFlow.API/Controllers/ProfileController.cs b/src/WorkFlow.API/Controllers/ProfileController.cs index c0a2ac0..f40c740 100644 --- a/src/WorkFlow.API/Controllers/ProfileController.cs +++ b/src/WorkFlow.API/Controllers/ProfileController.cs @@ -33,7 +33,7 @@ public class ProfileController : ControllerBase return Unauthorized("Failed to retrieve user identity."); } - var profile = await _mediator.Send(new ReadProfile(UserId: userId)); + var profile = await _mediator.ReadProfileAsync(userId); return profile is null ? NotFound() : Ok(profile); } catch (Exception ex) diff --git a/src/WorkFlow.Application/Profiles/ReadProfile.cs b/src/WorkFlow.Application/Profiles/ReadProfile.cs index 48bd4e0..3860189 100644 --- a/src/WorkFlow.Application/Profiles/ReadProfile.cs +++ b/src/WorkFlow.Application/Profiles/ReadProfile.cs @@ -46,3 +46,9 @@ public class ReadProfileHandler : IRequestHandler ReadProfileAsync(this IMediator mediator, int userId, bool includeObject = true) + => mediator.Send(new ReadProfile(UserId: userId, IncludeObject: includeObject)); +} \ No newline at end of file