feature/smbcloud-deploy
claude/smbcloud-github-app-k9641p
development
feature/apps
feature/build-release
feature/ci-docs
feature/ci-ruby-gems
feature/cicd
feature/completion
feature/dist-nuget
feature/fix-ci-sdk-pypi-rubygem
feature/fix-clippy-on-stable-channel
feature/fix-deployment-script
feature/github-email
feature/gresiq-v1
feature/project-new-structure
feature/rsync-deploy
feature/ruby-runner
feature/sdk-npm
feature/sdk-workflows
feature/smbcloud-cli-release-npm
feature/smbcloud-deploy
feature/wasm
main
release/v0.7.4
| 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 | } |