Return 404 when order item not found in DELETE /order/items
This commit is contained in:
@@ -204,6 +204,8 @@ class orderItemsRoute
|
||||
$response->error('Order not found', 404);
|
||||
}
|
||||
self::requireDepartmentAccess((string)(int)$orderForAccess->department_id->value());
|
||||
} else {
|
||||
$response->error('Order item not found', 404);
|
||||
}
|
||||
// Delete the order item
|
||||
(new order_items_o())->removeOrderItem((int)$data['id']);
|
||||
|
||||
Reference in New Issue
Block a user