mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-16 05:36:50 +00:00
1 parent
0024354345
commit
9b658d86b2
316 files changed
+1590
-1593
No files matched your search
@@ -1,16 +1,16 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use axum::{Router, response::IntoResponse, routing::get};
|
||||
use conduwuit::Error;
|
||||
use conduwuit_api::router::{state, state::Guard};
|
||||
use conduwuit_service::Services;
|
||||
use http::{StatusCode, Uri};
|
||||
use ruma::api::client::error::ErrorKind;
|
||||
use tuwunel_api::router::{state, state::Guard};
|
||||
use tuwunel_core::Error;
|
||||
use tuwunel_service::Services;
|
||||
|
||||
pub(crate) fn build(services: &Arc<Services>) -> (Router, Guard) {
|
||||
let router = Router::<state::State>::new();
|
||||
let (state, guard) = state::create(services.clone());
|
||||
let router = conduwuit_api::router::build(router, &services.server)
|
||||
let router = tuwunel_api::router::build(router, &services.server)
|
||||
.route("/", get(it_works))
|
||||
.fallback(not_found)
|
||||
.with_state(state);
|
||||
@@ -22,4 +22,4 @@ async fn not_found(_uri: Uri) -> impl IntoResponse {
|
||||
Error::Request(ErrorKind::Unrecognized, "Not Found".into(), StatusCode::NOT_FOUND)
|
||||
}
|
||||
|
||||
async fn it_works() -> &'static str { "hewwo from conduwuit woof!" }
|
||||
async fn it_works() -> &'static str { "hewwo from tuwunel woof!" }
|
||||
Reference in new issue
Block a user