mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
feat: Implement dedicated 404 page for routes under /_continuwuity/
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use axum::{Router, response::IntoResponse};
|
||||
use axum::{
|
||||
Router,
|
||||
response::{IntoResponse, Redirect},
|
||||
routing::get,
|
||||
};
|
||||
use conduwuit::Error;
|
||||
use conduwuit_service::{Services, state, state::Guard};
|
||||
use http::{StatusCode, Uri};
|
||||
@@ -10,7 +14,8 @@ 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)
|
||||
.merge(conduwuit_web::build())
|
||||
.nest("/_continuwuity/", conduwuit_web::build())
|
||||
.route("/", get(async || Redirect::permanent("/_continuwuity/")))
|
||||
.fallback(not_found)
|
||||
.with_state(state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user