postmasterlib/async_remote/
notification_remote.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

use common::model::status_message::StatusMessage;
use common::remote::async_remote::post;
use common::remote::services;
use hyper::HeaderMap;

use crate::dto::medication_log::MedicationLog;


pub async fn send_medication_log(headers: HeaderMap, dto: MedicationLog) -> Result<StatusMessage, String> {
    post::<_, StatusMessage>(
        services::POSTMASTER_API,
        String::from("/mail/medicationLog"),
        headers,
        dto,
    ).await
}