add services state to router

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-05 07:30:30 +00:00
parent aebae11c82
commit c2267d4c03

View file

@ -2,13 +2,18 @@ use std::sync::Arc;
use axum::{response::IntoResponse, routing::get, Router};
use conduit::{Error, Server};
use conduit_service as service;
use http::Uri;
use ruma::api::client::error::ErrorKind;
extern crate conduit_api as api;
pub(crate) fn build(server: &Arc<Server>) -> Router {
let router = Router::new().fallback(not_found).route("/", get(it_works));
let state = service::services();
let router = Router::new()
.route("/", get(it_works))
.fallback(not_found)
.with_state(state);
api::router::build(router, server)
}