From 6041d579488006cb3ecf687a03d6042166f9d9e3 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 3 Dec 2025 11:30:18 +0100 Subject: [PATCH] Add CancellationToken support to Get method The `Get` method in `RecActionController` was updated to include a `CancellationToken` parameter, enabling support for operation cancellation. The `mediator.Send` call was modified to pass the token. No changes were made to the `Invoke` method or other unrelated parts of the class. --- src/ReC.API/Controllers/RecActionController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs index 757e751..a407991 100644 --- a/src/ReC.API/Controllers/RecActionController.cs +++ b/src/ReC.API/Controllers/RecActionController.cs @@ -13,10 +13,10 @@ namespace ReC.API.Controllers; public class RecActionController(IMediator mediator) : ControllerBase { [HttpGet] - public async Task Get([FromQuery] long profileId) => Ok(await mediator.Send(new ReadRecActionQuery() + public async Task Get([FromQuery] long profileId, CancellationToken cancel) => Ok(await mediator.Send(new ReadRecActionQuery() { ProfileId = profileId - })); + }, cancel)); [HttpPost("{profileId}")] public async Task Invoke([FromRoute] int profileId)