remove store kyc features
This commit is contained in:
@@ -90,11 +90,15 @@ public class ShopPOController(ShopPOService service, ICurrentUserService current
|
||||
}
|
||||
|
||||
[HttpPost("{id:guid}/cancel")]
|
||||
public async Task<IActionResult> Cancel(Guid id, CancellationToken ct)
|
||||
public async Task<IActionResult> Cancel(Guid id, CancelShopPORequest request, CancellationToken ct)
|
||||
{
|
||||
// TEMPORARY: currentUser.UserId is always unset due to the broken auth middleware
|
||||
// (testbug.md #28) — fall back to the explicitly supplied user until that's fixed.
|
||||
var userId = currentUser.UserId ?? request.CancelledByUserId;
|
||||
if (userId is null) return BadRequest(new { error = "CancelledByUserId is required while auth is unavailable" });
|
||||
try
|
||||
{
|
||||
var result = await service.CancelAsync(id, ct);
|
||||
var result = await service.CancelAsync(id, userId.Value, request.Reason, ct);
|
||||
return Ok(result);
|
||||
}
|
||||
catch (KeyNotFoundException) { return NotFound(); }
|
||||
|
||||
Reference in New Issue
Block a user