refactor(dir): ♻ lint ChangesController

This commit is contained in:
Collin M. Barrett 2021-11-26 15:19:54 -06:00
parent 7ae5bdfcf0
commit a51f6faa6a

View file

@ -20,10 +20,9 @@ public ChangesController(IMemoryCache cache, IMediator mediator) : base(cache)
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The changes.</returns>
[HttpGet]
//[ProducesResponseType(typeof(IEnumerable<GetChanges.ChangesVm>), StatusCodes.Status200OK)]
public async Task<IActionResult> Get(CancellationToken cancellationToken)
[ProducesResponseType(typeof(List<GetChanges.ChangesVm>), StatusCodes.Status200OK)]
public Task<IActionResult> Get(CancellationToken cancellationToken)
{
return Ok(await _mediator.Send(new GetChanges.Query(), cancellationToken));
//return CacheGetOrCreateAsync(() => _mediator.Send(new GetChanges.Query(), cancellationToken));
return CacheGetOrCreateAsync(() => _mediator.Send(new GetChanges.Query(), cancellationToken));
}
}