Complete CCS results and rating flow
This commit is contained in:
@@ -9,7 +9,7 @@ namespace QuestionsApi.Controllers;
|
||||
[ApiController]
|
||||
[Route("api/ccs")]
|
||||
[Authorize(Roles = "USER,SUPER")]
|
||||
public sealed class CcsController(CcsStore store) : ControllerBase
|
||||
public sealed class CcsController(CcsStore store, CcsRatingStore ratings) : ControllerBase
|
||||
{
|
||||
[HttpGet("cases")]
|
||||
public async Task<IActionResult> Cases() => Ok(await store.ListCasesAsync());
|
||||
@@ -59,6 +59,9 @@ public sealed class CcsController(CcsStore store) : ControllerBase
|
||||
[HttpGet("prediction")]
|
||||
public async Task<IActionResult> Prediction() => Ok(await store.PredictionAsync(UserId()));
|
||||
|
||||
[HttpGet("ratings/me")]
|
||||
public async Task<IActionResult> Rating() => Ok(await ratings.GetProfileAsync(UserId()));
|
||||
|
||||
[HttpPost("admin/import")]
|
||||
[Authorize(Roles = "SUPER")]
|
||||
public async Task<IActionResult> Import(CcsImportRequest request)
|
||||
|
||||
Reference in New Issue
Block a user