1 use {
2 crate::url_builder::build_frontend_app_deploy_config_url,
3 reqwest::Client,
4 smbcloud_model::{deploy_config::DeployConfig, error_codes::ErrorResponse},
5 smbcloud_network::{environment::Environment, network::request},
6 smbcloud_networking::{constants::SMB_USER_AGENT, smb_client::SmbClient},
7 };
8
9 pub async fn get_deploy_config(
10 environment: Environment,
11 client: (&SmbClient, &str),
12 access_token: String,
13 frontend_app_id: &str,
14 ) -> Result<DeployConfig, ErrorResponse> {
15 let url = build_frontend_app_deploy_config_url(environment, client, frontend_app_id);
16 let builder = Client::new()
17 .get(url)
18 .header("Authorization", access_token)
19 .header("User-agent", SMB_USER_AGENT);
20 request(builder).await
21 }