Skip to main content

orders_json

Function orders_json 

Source
pub async fn orders_json(
    orders: &[Order],
    base_url: &str,
    database: &Database,
) -> Result<Vec<Value>, Error>
Expand description

A page of orders as their admin JSON, each with its authorization ids.

One query for the whole page rather than one per row — a default page of 50 used to cost 51. The CLI’s order list --json, /api/orders, /api/accounts/{id}/orders and the /ui order lists all render through here, so they cannot disagree on the shape or on the cost.