Add analytics functionality for stores
This commit is contained in:
@@ -92,6 +92,13 @@ public class StoreController(StoreService service) : ControllerBase
|
||||
return result is null ? NotFound() : Ok(result);
|
||||
}
|
||||
|
||||
[HttpGet("{id:guid}/analytics")]
|
||||
public async Task<IActionResult> GetAnalytics(Guid id, [FromQuery] int months = 12, [FromQuery] int overdueDays = 30)
|
||||
{
|
||||
var result = await service.GetAnalyticsAsync(id, months, overdueDays);
|
||||
return result is null ? NotFound() : Ok(result);
|
||||
}
|
||||
|
||||
[HttpPatch("{id:guid}/status")]
|
||||
public async Task<IActionResult> PatchStatus(Guid id, PatchStoreStatusRequest request, CancellationToken ct)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user