fix: setup.rs example
@@ -5,32 +5,28 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = influxdb2_client::Client::new(influx_url, token);
- println!("{:?}", client.setup().await?);
+ if client.is_onboarding_allowed().await? {
println!(
"{:?}",
client
- .setup_init(
- "some-user",
- "some-org",
- "some-bucket",
- Some("some-password".to_string()),
- Some(1),
- None
- )
+ .onboarding("some-user", "some-org", "some-bucket", None, None, None,)
.await?
);
+ }
+
println!(
"{:?}",
client
- .setup_new(
+ .post_setup_user(
"some-new-user",
"some-new-org",
"some-new-bucket",
- Some("some-new-password".to_string()),
- Some(1),
+ None,
+ None,
None,
)
.await?
);
+
Ok(())
}
