Skip to main content

handle_read

Function handle_read 

Source
pub async fn handle_read(
    req: HttpRequest,
    body: String,
    state: Data<AppState>,
) -> Result<HttpResponse, HaystackError>
Expand description

POST /api/hisRead

Request grid has one row with id (Ref) and range (Str) columns.

Supported range formats:

  • "today" / "yesterday" — date ranges based on local time
  • "YYYY-MM-DD" — a single date (midnight to midnight)
  • "YYYY-MM-DD,YYYY-MM-DD" — explicit start,end dates (start inclusive, end exclusive midnight)