Fixes #21

Merged
DeepnaPooja merged 61 commits from fixes into dev 2026-09-10 16:00:04 +05:30
Showing only changes of commit be66e65e59 - Show all commits
@@ -21,7 +21,7 @@ public class OrderController(OrderService service) : ControllerBase
public async Task<IActionResult> GetByStore(Guid storeId)
{
var result = await service.GetByStoreIdAsync(storeId);
return result is null ? Forbid() : Ok(result);
return result is null ? StatusCode(StatusCodes.Status403Forbidden) : Ok(result);
}
[HttpPost]
@@ -30,7 +30,7 @@ public class OrderController(OrderService service) : ControllerBase
try
{
var result = await service.CreateAsync(request, ct);
return result is null ? Forbid() : CreatedAtAction(nameof(GetById), new { id = result.Id }, result);
return result is null ? StatusCode(StatusCodes.Status403Forbidden) : CreatedAtAction(nameof(GetById), new { id = result.Id }, result);
}
catch (InvalidOperationException ex) { return BadRequest(new { error = ex.Message }); }
}