userlib/async_remote/
organization_remote.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use common::remote::async_remote::{ post};
use common::remote::services;
use hyper::HeaderMap;
use uuid::Uuid;
use crate::dto::organization_name_response::OrganizationNameResponse;

pub async fn find_by_ids(
    ids: Vec<Uuid>,
    headers: HeaderMap,
) -> Result<Vec<OrganizationNameResponse>, String> {
    post::<_, Vec<OrganizationNameResponse>>(
        services::USER_API,
        String::from("/organization/getOrgByIds"),
        headers,
        ids,
    ).await
}