Add clinical progression ranks and records

This commit is contained in:
hz
2026-08-01 15:17:42 -05:00
parent bc9f68aaf2
commit 8c5aa17d89
21 changed files with 631 additions and 10 deletions
@@ -8,7 +8,7 @@ namespace QuestionsApi.Controllers;
[ApiController]
[Route("api/dashboard")]
[Authorize(Roles = "USER,SUPER")]
public sealed class DashboardController(DashboardStore dashboard) : ControllerBase
public sealed class DashboardController(DashboardStore dashboard, ProgressionStore progression) : ControllerBase
{
[HttpGet]
public async Task<IActionResult> Get()
@@ -18,6 +18,8 @@ public sealed class DashboardController(DashboardStore dashboard) : ControllerBa
?? User.Identity?.Name
?? "";
if (string.IsNullOrWhiteSpace(userId)) return Unauthorized();
return Ok(await dashboard.GetAsync(userId, DateTime.UtcNow));
var response = await dashboard.GetAsync(userId, DateTime.UtcNow);
response.Progression = await progression.GetAsync(userId);
return Ok(response);
}
}