Skip to content

Commit

Permalink
rust: Reorder methods
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-jplatte committed Jan 8, 2025
1 parent cabd00c commit d7a851a
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions rust/src/api/authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ impl<'a> Authentication<'a> {
Self { cfg }
}

pub async fn dashboard_access(
&self,
app_id: String,
options: Option<PostOptions>,
) -> Result<DashboardAccessOut> {
let PostOptions { idempotency_key } = options.unwrap_or_default();

crate::request::Request::new(
http1::Method::POST,
"/api/v1/auth/dashboard-access/{app_id}",
)
.with_path_param("app_id", app_id)
.with_optional_header_param("idempotency-key", idempotency_key)
.execute(self.cfg)
.await
}

/// Use this function to get magic links (and authentication codes) for
/// connecting your users to the Consumer Application Portal.
pub async fn app_portal_access(
Expand Down Expand Up @@ -66,6 +49,23 @@ impl<'a> Authentication<'a> {
.await
}

pub async fn dashboard_access(
&self,
app_id: String,
options: Option<PostOptions>,
) -> Result<DashboardAccessOut> {
let PostOptions { idempotency_key } = options.unwrap_or_default();

crate::request::Request::new(
http1::Method::POST,
"/api/v1/auth/dashboard-access/{app_id}",
)
.with_path_param("app_id", app_id)
.with_optional_header_param("idempotency-key", idempotency_key)
.execute(self.cfg)
.await
}

/// Logout an app token.
///
/// Trying to log out other tokens will fail.
Expand Down

0 comments on commit d7a851a

Please sign in to comment.