fix: update for later version of gotrue
This commit is contained in:
parent
44a8bf35c2
commit
eb74e095b5
|
|
@ -105,7 +105,7 @@ pub struct GoTrueSettings {
|
||||||
pub mailer_autoconfirm: bool,
|
pub mailer_autoconfirm: bool,
|
||||||
pub phone_autoconfirm: bool,
|
pub phone_autoconfirm: bool,
|
||||||
pub sms_provider: String,
|
pub sms_provider: String,
|
||||||
pub mfa_enabled: bool,
|
pub mfa_enabled: Option<bool>, // later version have this field removed
|
||||||
pub saml_enabled: bool,
|
pub saml_enabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,7 @@ impl Client {
|
||||||
pub async fn settings(&self) -> Result<GoTrueSettings, GoTrueError> {
|
pub async fn settings(&self) -> Result<GoTrueSettings, GoTrueError> {
|
||||||
let url: String = format!("{}/settings", self.base_url);
|
let url: String = format!("{}/settings", self.base_url);
|
||||||
let resp = self.client.get(&url).send().await?;
|
let resp = self.client.get(&url).send().await?;
|
||||||
let settings: GoTrueSettings = from_response(resp)
|
let settings: GoTrueSettings = from_response(resp).await?;
|
||||||
.await
|
|
||||||
.context(format!("calling {} failed", url))?;
|
|
||||||
Ok(settings)
|
Ok(settings)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue