From b49a4724a8ab09222913053f2b7bcd43fb6880f3 Mon Sep 17 00:00:00 2001 From: Johanna Dorothea Reichmann Date: Sun, 15 Sep 2024 13:12:59 +0200 Subject: [PATCH] chore: make AppState extractable by deriving FromRef --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 44fc73a..9841dbe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,7 @@ use std::sync::{Arc}; use tokio::sync::Mutex; use axum::Router; +use axum::extract::FromRef; use axum::routing::{get, post}; use openidconnect::{ IntrospectionUrl, @@ -18,7 +19,7 @@ mod util; use crate::util::powerdns::PowerDnsApi; -#[derive(Clone)] +#[derive(Clone, FromRef)] pub struct AppState { oidc_client: CoreClient, pdns_client: PowerDnsApi,