use crate::AppState;
use axum::Router;
use std::sync::Arc;

mod bearer_token;
mod discord;
mod local;
mod session;

pub use local::UserInfo;
pub use session::Session;

pub mod middleware;
pub use middleware::{AdminAuthorization, SessionAuthorization};

pub fn get_routes() -> Router<Arc<AppState>> {
  Router::new()
    .merge(local::get_routes())
    .nest("/discord", discord::get_routes())
}
