feature/dist-nuget
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 | reqwest::Client, |
| 3 | smbcloud_model::{account::SmbAuthorization, error_codes::ErrorResponse}, |
| 4 | smbcloud_network::{environment::Environment, network::request}, |
| 5 | smbcloud_networking::{ |
| 6 | constants::PATH_RESEND_CONFIRMATION, smb_base_url_builder, smb_client::SmbClient, |
| 7 | }, |
| 8 | }; |
| 9 | |
| 10 | pub async fn resend_email_verification( |
| 11 | env: Environment, |
| 12 | client: (&SmbClient, &str), |
| 13 | email: String, |
| 14 | ) -> Result<SmbAuthorization, ErrorResponse> { |
| 15 | let builder = Client::new() |
| 16 | .post(build_smb_resend_email_verification_url(env, client)) |
| 17 | .body(format!("email={}", email)) |
| 18 | .header("User-agent", client.0.id()) |
| 19 | .header("Accept", "application/json") |
| 20 | .header("Content-Type", "application/x-www-form-urlencoded"); |
| 21 | |
| 22 | request(builder).await |
| 23 | } |
| 24 | |
| 25 | fn build_smb_resend_email_verification_url(env: Environment, client: (&SmbClient, &str)) -> String { |
| 26 | let mut url_builder = smb_base_url_builder(env, client); |
| 27 | url_builder.add_route(PATH_RESEND_CONFIRMATION); |
| 28 | url_builder.build() |
| 29 | } |