canteenlib/remote/
order_remote.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use common::remote::{put, services};
use uuid::Uuid;
use hyper::HeaderMap;
use crate::dto::order_response::OrderResponse;

pub fn update(headers: HeaderMap, id : Uuid, status : String ) -> Result<OrderResponse, String> {
    put::<_, OrderResponse>(
        services::CANTEEN_API,
        String::from(format!("/order/updateStatus/{}/{}", id, status)),
        headers,
        (),
    )
}