chore: make AppState extractable by deriving FromRef
This commit is contained in:
parent
2fc6caad1c
commit
b49a4724a8
@ -4,6 +4,7 @@ use std::sync::{Arc};
|
|||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
|
|
||||||
use axum::Router;
|
use axum::Router;
|
||||||
|
use axum::extract::FromRef;
|
||||||
use axum::routing::{get, post};
|
use axum::routing::{get, post};
|
||||||
use openidconnect::{
|
use openidconnect::{
|
||||||
IntrospectionUrl,
|
IntrospectionUrl,
|
||||||
@ -18,7 +19,7 @@ mod util;
|
|||||||
|
|
||||||
use crate::util::powerdns::PowerDnsApi;
|
use crate::util::powerdns::PowerDnsApi;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, FromRef)]
|
||||||
pub struct AppState {
|
pub struct AppState {
|
||||||
oidc_client: CoreClient,
|
oidc_client: CoreClient,
|
||||||
pdns_client: PowerDnsApi,
|
pdns_client: PowerDnsApi,
|
||||||
|
Loading…
Reference in New Issue
Block a user