From f63c6a7c75d1a5c3f2dba7288b4ee947293c1526 Mon Sep 17 00:00:00 2001 From: kozabrada123 Date: Sun, 18 Aug 2024 10:41:03 +0200 Subject: [PATCH] grumble grumble --- src/api/users/connections.rs | 30 +++++++++++++++--------------- src/types/schema/user.rs | 10 ++++------ 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/api/users/connections.rs b/src/api/users/connections.rs index 9a6f3ee..6caf95e 100644 --- a/src/api/users/connections.rs +++ b/src/api/users/connections.rs @@ -140,20 +140,20 @@ impl ChorusUser { /// let result = user.create_domain_connection(&domain).await; /// /// if let Ok(returned) = result { - /// match returned { - /// CreateDomainConnectionReturn::ProofNeeded(proof) => { - /// println!("Additional proof needed!"); - /// println!("Either:"); - /// println!(""); - /// println!("- create a DNS TXT record with the name _discord.{domain} and content {proof}"); - /// println!("or"); - /// println!("- create a file at https://{domain}/.well-known/discord with the content {proof}"); - /// // Once the user has added the proof, retry calling the endpoint - /// } - /// CreateDomainConnectionReturn::Ok(connection) => { - /// println!("Successfulyl created connection! {:?}", connection); - /// } - /// } + /// match returned { + /// CreateDomainConnectionReturn::ProofNeeded(proof) => { + /// println!("Additional proof needed!"); + /// println!("Either:"); + /// println!(""); + /// println!("- create a DNS TXT record with the name _discord.{domain} and content {proof}"); + /// println!("or"); + /// println!("- create a file at https://{domain}/.well-known/discord with the content {proof}"); + /// // Once the user has added the proof, retry calling the endpoint + /// } + /// CreateDomainConnectionReturn::Ok(connection) => { + /// println!("Successfulyl created connection! {:?}", connection); + /// } + /// } /// } else { /// println!("Failed to create connection: {:?}", result); /// } @@ -205,7 +205,7 @@ impl ChorusUser { } } - return Err(error); + Err(error) } // TODO: Add create_domain_connection () diff --git a/src/types/schema/user.rs b/src/types/schema/user.rs index c8f9d9a..41b05a1 100644 --- a/src/types/schema/user.rs +++ b/src/types/schema/user.rs @@ -422,9 +422,7 @@ pub enum CreateDomainConnectionReturn { /// To verify ownership, either: /// /// - add the proof string as a TXT DNS record to the domain, - /// with the name of the record being `_discord.{domain}` - /// - /// or + /// with the name of the record being `_discord.{domain}` or /// /// - serve the proof string as a file at `https://{domain}/.well-known/discord` /// @@ -443,9 +441,9 @@ pub enum CreateDomainConnectionReturn { /// # Reference /// ```json /// { -/// "amount": 2, -/// "replenished_today": false, -/// "next_replenish_at": "2024-08-18T23:53:17+00:00" +/// "amount": 2, +/// "replenished_today": false, +/// "next_replenish_at": "2024-08-18T23:53:17+00:00" /// } /// ``` pub struct BurstCreditsInfo {