mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2024-11-27 20:45:30 +00:00
add services state to router
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
aebae11c82
commit
c2267d4c03
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue