settingslib/remote/
organisational_remote.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use common::remote::{get, services};
use hyper::HeaderMap;
use uuid::Uuid;
use crate::dto::organisational_response::OrganisationalResponse;


pub fn get_full_organisational_settings(headers: HeaderMap) -> Result<OrganisationalResponse, String> {
    get::<OrganisationalResponse>(
        services::SETTINGS_API,
        String::from("/organisational/fullSettings"),
        headers,
    )
}

pub fn get_full_organisational_settings_by_id(id: Uuid) -> Result<OrganisationalResponse, String> {
    get(
        services::SETTINGS_API,
        format!("/organisational/fullSettingsById/{id}"),
        HeaderMap::new(),
    )
}