Rebuild CCS case workflow
This commit is contained in:
@@ -51,6 +51,16 @@ public sealed class CcsController(CcsStore store, CcsRatingStore ratings) : Cont
|
||||
catch (InvalidOperationException exception) { return Conflict(exception.Message); }
|
||||
}
|
||||
|
||||
[HttpPost("attempts/{id}/commands/batch")]
|
||||
public async Task<IActionResult> BatchCommand(string id, CcsBatchCommandRequest request)
|
||||
{
|
||||
var attempt = await store.GetOwnedAsync(id, UserId());
|
||||
if (attempt is null) return NotFound();
|
||||
try { return Ok(await store.ToResponseAsync(await store.ApplyBatchCommandAsync(attempt, request))); }
|
||||
catch (ArgumentException exception) { return BadRequest(exception.Message); }
|
||||
catch (InvalidOperationException exception) { return Conflict(exception.Message); }
|
||||
}
|
||||
|
||||
[HttpPost("attempts/{id}/abandon")]
|
||||
public async Task<IActionResult> Abandon(string id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user